added hybrid var with diffusion model and mapping txt prompt to imageClassNet#165
Open
poovarasansivakumar2003 wants to merge 1 commit into
Open
added hybrid var with diffusion model and mapping txt prompt to imageClassNet#165poovarasansivakumar2003 wants to merge 1 commit into
poovarasansivakumar2003 wants to merge 1 commit into
Conversation
jasonpan0930
added a commit
to jasonpan0930/VAR_PolarQuant
that referenced
this pull request
Jun 19, 2026
Add `quant_v` flag to switch between K-only and K+V polar quantization at inference time, and infrastructure for separate K/V kmeans codebooks. Model changes (models/basic_var.py, models/var.py): - SelfAttention.kv_caching() gains `quant_v: bool` parameter - When polar_config is set but quant_v=False, V stays standard FP16 cache - All other call sites default quant_v=True (backward compatible) - autoregressive_infer_cfg reads self.quant_v (set by set_polar_quant) Experiment scripts: - exp/exp_fid_sample.py: --quant-v/--no-quant-v CLI, auto-load V codebook - exp/exp_cross_block_cumulative_mse.py: --quant-v/--no-quant-v, depth-30 codebook paths, output files tagged _KV_ or _Konly_ - exp/exp_theta2_kmeans.py: --collect-v for V-specific kmeans fitting, L0-only theta2 collection - exp/sbatch_fid_sample.sh: QUANT_V env var forwarded to script Codebook registry (utils/angle_quant.py): - register_theta2_kmeans_codebook_v() for V-specific codebook - register_theta2_kmeans_codebook() unchanged (K) Angle statistics (utils/polar_angle_viz.py): - record_v() method for V-vector theta2 collection - aggregate_theta2_mse_for_kmeans_v() aggregator - Only L0 theta2 (first 16) collected for kmeans (per user feedback) - Fix: .cpu().numpy() on CUDA tensors in record_v - Fix: KeyError guard in aggregate_k_errors for dim_mean_abs_full Evaluator fix (guided-diffusion/evaluations/evaluator.py): - Shuffle preds before IS split to avoid underestimation when samples are ordered by class (OpenAI issue FoundationVision#165)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.