fix cpu offload not working
Browse files
app.py
CHANGED
@@ -197,7 +197,7 @@ def run_inference(config, config_history, progress=gr.Progress(track_tqdm=True))
|
|
197 |
num_inference_steps = int(config["inference_steps"]),
|
198 |
guidance_scale = float(config["guidance_scale"])).images
|
199 |
|
200 |
-
if str(config["
|
201 |
pipeline.enable_model_cpu_offload()
|
202 |
|
203 |
if config['refiner'].lower() != 'none':
|
@@ -207,7 +207,7 @@ def run_inference(config, config_history, progress=gr.Progress(track_tqdm=True))
|
|
207 |
image=image,
|
208 |
).images
|
209 |
|
210 |
-
if str(config["
|
211 |
refiner.enable_model_cpu_offload()
|
212 |
|
213 |
config_history.append(config.copy())
|
|
|
197 |
num_inference_steps = int(config["inference_steps"]),
|
198 |
guidance_scale = float(config["guidance_scale"])).images
|
199 |
|
200 |
+
if str(config["cpu_offload"]).lower() != 'false':
|
201 |
pipeline.enable_model_cpu_offload()
|
202 |
|
203 |
if config['refiner'].lower() != 'none':
|
|
|
207 |
image=image,
|
208 |
).images
|
209 |
|
210 |
+
if str(config["cpu_offload"]).lower() != 'false':
|
211 |
refiner.enable_model_cpu_offload()
|
212 |
|
213 |
config_history.append(config.copy())
|