Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -167,6 +167,7 @@ def enhance_image(
|
|
167 |
pipe.enable_vae_tiling()
|
168 |
pipe.enable_vae_slicing()
|
169 |
if device == "cuda":
|
|
|
170 |
pipe.enable_model_cpu_offload()
|
171 |
|
172 |
if USE_ESRGAN:
|
@@ -191,7 +192,7 @@ def enhance_image(
|
|
191 |
"black-forest-labs/FLUX.1-dev",
|
192 |
torch_dtype=dtype,
|
193 |
low_cpu_mem_usage=True,
|
194 |
-
device_map=
|
195 |
)
|
196 |
pipe.enable_vae_tiling()
|
197 |
pipe.enable_vae_slicing()
|
|
|
167 |
pipe.enable_vae_tiling()
|
168 |
pipe.enable_vae_slicing()
|
169 |
if device == "cuda":
|
170 |
+
pipe.reset_device_map()
|
171 |
pipe.enable_model_cpu_offload()
|
172 |
|
173 |
if USE_ESRGAN:
|
|
|
192 |
"black-forest-labs/FLUX.1-dev",
|
193 |
torch_dtype=dtype,
|
194 |
low_cpu_mem_usage=True,
|
195 |
+
device_map=None
|
196 |
)
|
197 |
pipe.enable_vae_tiling()
|
198 |
pipe.enable_vae_slicing()
|