Skip to content

fix(diffusion): use real images for I2V calibration - #2272

Merged
changwangss merged 1 commit into
mainfrom
fix/i2v-calibration-images
Sep 2, 2026
Merged

changwangss merged 1 commit into
mainfrom
fix/i2v-calibration-images

Conversation

@changwangss

@changwangss changwangss commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

fix issue #2270

Summary

  • replace the synthetic gray I2V calibration input with real COCO2014 image-caption pairs
  • download only selected calibration images and cache I2V data under the AutoRound cache root
  • support an optional image column in local TSV datasets while preserving T2V behavior

Test

(changwa1) lvkaokao@mlp-dgx-01:/data3/changwa1$ CUDA_VISIBLE_DEVICES=1 auto-round   --model /dataset/Wan2.2-I2V-A14B-Diffusers   --scheme NVFP4   --format llm_compressor   --device_map 0     --batch_size 1   --nsamples 1   --iters 1   --num_inference_steps 1 --low_gpu_mem_usage   --output_dir /data3/changwa1/Wan2.2-I2V-A14B-Diffusers-NVFP4-smoke --model_dtype bf16
W0902 13:18:19.910000 2760131 torch/utils/_pytree.py:630] <enum 'KernelPreference'> is an Enum subclass and is now natively supported by torch.compile as an opaque value type. Calling register_constant() on Enum subclasses is deprecated and will be an error in a future release.
W0902 13:18:19.938000 2760131 torch/utils/_pytree.py:630] <enum 'ScaleCalculationMode'> is an Enum subclass and is now natively supported by torch.compile as an opaque value type. Calling register_constant() on Enum subclasses is deprecated and will be an error in a future release.
2026-09-02 13:18:20 INFO main.py L309: start to quantize /dataset/Wan2.2-I2V-A14B-Diffusers
Unable to import `torchao` Tensor objects. This may affect loading checkpoints serialized with `torchao`
/data3/changwa1/.venv/lib/python3.13/site-packages/diffusers/utils/deprecation_utils.py:23: FutureWarning: `torch_dtype` is deprecated and will be removed in version 1.0.0. Please use `dtype` instead.
  deprecate("torch_dtype", "1.0.0", _TORCH_DTYPE_DEPRECATION_MESSAGE)
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████| 12/12 [00:02<00:00,  5.98it/s]
Loading weights: 100%|██████████████████████████████████████████████████████████████████████| 242/242 [00:00<00:00, 6794.53it/s]
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████| 12/12 [00:01<00:00,  6.70it/s]
Loading pipeline components...: 100%|█████████████████████████████████████████████████████████████| 6/6 [00:06<00:00,  1.03s/it]
2026-09-02 13:18:28 WARNING logging.py L340: reset enable_torch_compile to `False` as `iters`=1 is below 10, so compilation cost would outweigh its benefit
2026-09-02 13:18:28 INFO base.py L1301: `torch.compile` is disabled, as `iters`=1 is below 10
2026-09-02 13:18:28 INFO composer.py L204: Block-forward torch.compile is disabled because at least one quantized layer uses NVFP4.
2026-09-02 13:18:28 INFO diffusion_mixin.py L400: Detected multi-transformer diffusion pipeline, quantizing all transformers
2026-09-02 13:18:28 WARNING diffusion_mixin.py L405: num_inference_steps=1 is too low for dual-transformer quantization — increasing to 2 so all transformers receive calibration data.
2026-09-02 13:18:28 INFO diffusion_mixin.py L428: start to cache block inputs for primary transformer
2026-09-02 13:18:29 INFO orchestrator.py L570: start to cache block inputs
2026-09-02 13:18:29 WARNING diffusion.py L108: Diffusion model will catch nsamples * num_inference_steps inputs, you can reduce nsamples or num_inference_steps if OOM or take too much time.
2026-09-02 13:18:29 INFO dataset.py L279: use dataset coco2014, loading calibration data...
2026-09-02 13:18:56 INFO dataset.py L143: Caching 1 CC BY 2.0 COCO images for I2V calibration in /home/lvkaokao/.cache/auto_round/datasets/coco2014/images
100%|█████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:47<00:00, 47.05s/it]
100%|█████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:47<00:00, 47.05s/it]


@AutoRoundBot

Copy link
Copy Markdown
Collaborator

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@changwangss

Copy link
Copy Markdown
Contributor Author

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: changwangss <chang1.wang@intel.com>
@changwangss
changwangss force-pushed the fix/i2v-calibration-images branch from 5bdf244 to 0e5d137 Compare September 2, 2026 03:53
@AutoRoundBot

Copy link
Copy Markdown
Collaborator

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@lvliang-intel lvliang-intel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@changwangss
changwangss merged commit 1df1cef into main Sep 2, 2026
51 checks passed
@changwangss
changwangss deleted the fix/i2v-calibration-images branch September 2, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants