ICGenAIShare04 commited on
Commit
7a2f22f
·
verified ·
1 Parent(s): 84e2cb3

fix: update torchao FP8 quantization API for HF Spaces compatibility

Browse files
Files changed (1) hide show
  1. src/video_generator_hf.py +2 -2
src/video_generator_hf.py CHANGED
@@ -60,8 +60,8 @@ def _get_pipe():
60
 
61
  # Quantize transformer to FP8 to fit in 24GB ZeroGPU VRAM
62
  # (~28GB bf16 → ~14GB fp8). VAE + image encoder stay float32.
63
- from torchao.quantization import quantize_, float8_weight_only
64
- quantize_(_pipe.transformer, float8_weight_only())
65
 
66
  _pipe.to("cuda")
67
 
 
60
 
61
  # Quantize transformer to FP8 to fit in 24GB ZeroGPU VRAM
62
  # (~28GB bf16 → ~14GB fp8). VAE + image encoder stay float32.
63
+ from torchao.quantization import quantize_, Float8WeightOnlyConfig
64
+ quantize_(_pipe.transformer, Float8WeightOnlyConfig())
65
 
66
  _pipe.to("cuda")
67