Abdullahcoder54 commited on
Commit
2ef274d
·
1 Parent(s): 47ca9a8

Fix GGUFQuantizationConfig import + pin diffusers 0.33 (LTX2 + GGUF)

Browse files
Files changed (2) hide show
  1. app.py +5 -1
  2. requirements.txt +4 -2
app.py CHANGED
@@ -81,7 +81,11 @@ def _download_gguf(dest: str) -> str:
81
 
82
  def _build_transformer(gguf_path: str):
83
  from diffusers import AutoModel
84
- from diffusers.utils import GGUFQuantizationConfig
 
 
 
 
85
 
86
  kwargs = dict(
87
  quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),
 
81
 
82
  def _build_transformer(gguf_path: str):
83
  from diffusers import AutoModel
84
+
85
+ try:
86
+ from diffusers.utils import GGUFQuantizationConfig
87
+ except ImportError: # newer diffusers moved it under utils.quantization_config
88
+ from diffusers.utils.quantization_config import GGUFQuantizationConfig
89
 
90
  kwargs = dict(
91
  quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),
requirements.txt CHANGED
@@ -1,7 +1,9 @@
1
  # For ZeroGPU, gradio/spaces/huggingface_hub/torch are preinstalled and
2
  # platform-managed; the Dockerfile installs them explicitly.
3
- diffusers>=0.33
4
- transformers>=4.46
 
 
5
  accelerate>=1.0
6
  gguf
7
  safetensors
 
1
  # For ZeroGPU, gradio/spaces/huggingface_hub/torch are preinstalled and
2
  # platform-managed; the Dockerfile installs them explicitly.
3
+ # Pinned to 0.33: LTX2 pipelines + GGUFQuantizationConfig both live here;
4
+ # newer diffusers moved GGUFQuantizationConfig out of diffusers.utils.
5
+ diffusers==0.33.0
6
+ transformers==4.49.0
7
  accelerate>=1.0
8
  gguf
9
  safetensors