Spaces:
Runtime error
Runtime error
kylin0421 commited on
Commit ·
c1baeff
1
Parent(s): 911a56b
cpu offload
Browse files
__pycache__/optimization_quantized.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/optimization_quantized.cpython-312.pyc and b/__pycache__/optimization_quantized.cpython-312.pyc differ
|
|
|
optimization_quantized.py
CHANGED
|
@@ -192,4 +192,8 @@ def optimize_pipeline_int8(
|
|
| 192 |
except AttributeError:
|
| 193 |
pass
|
| 194 |
|
| 195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
except AttributeError:
|
| 193 |
pass
|
| 194 |
|
| 195 |
+
try:
|
| 196 |
+
pipeline.enable_model_cpu_offload()
|
| 197 |
+
except AttributeError:
|
| 198 |
+
# Older diffusers versions might not expose cpu offload helpers.
|
| 199 |
+
pipeline.to("cuda")
|