Spaces:
Running
on
L40S
Running
on
L40S
Update app.py
Browse files
app.py
CHANGED
@@ -117,10 +117,10 @@ pipe.to(device)
|
|
117 |
|
118 |
# Enable CPU offload for the model.
|
119 |
# turn on if you don't have multiple GPUs or enough GPU memory(such as H100) and it will cost more time in inference, it may also reduce the quality
|
120 |
-
|
121 |
-
|
122 |
-
pipe.vae.enable_slicing()
|
123 |
-
pipe.vae.enable_tiling()
|
124 |
|
125 |
os.makedirs("./output", exist_ok=True)
|
126 |
os.makedirs("./gradio_tmp", exist_ok=True)
|
|
|
117 |
|
118 |
# Enable CPU offload for the model.
|
119 |
# turn on if you don't have multiple GPUs or enough GPU memory(such as H100) and it will cost more time in inference, it may also reduce the quality
|
120 |
+
pipe.enable_model_cpu_offload()
|
121 |
+
pipe.enable_sequential_cpu_offload()
|
122 |
+
# pipe.vae.enable_slicing()
|
123 |
+
# pipe.vae.enable_tiling()
|
124 |
|
125 |
os.makedirs("./output", exist_ok=True)
|
126 |
os.makedirs("./gradio_tmp", exist_ok=True)
|