Spaces:
Runtime error
Runtime error
Commit ·
5fcc5dc
1
Parent(s): 2ef274d
GGUFQuantizationConfig lives in diffusers.quantizers.quantization_config (0.33)
Browse files
app.py
CHANGED
|
@@ -83,9 +83,10 @@ 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),
|
|
|
|
| 83 |
from diffusers import AutoModel
|
| 84 |
|
| 85 |
try:
|
| 86 |
+
# diffusers 0.33.x (pinned): GGUF config lives under quantizers.
|
| 87 |
+
from diffusers.quantizers.quantization_config import GGUFQuantizationConfig
|
| 88 |
+
except ImportError: # later versions re-export it from diffusers.utils
|
| 89 |
from diffusers.utils import GGUFQuantizationConfig
|
|
|
|
|
|
|
| 90 |
|
| 91 |
kwargs = dict(
|
| 92 |
quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),
|