Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -167,7 +167,7 @@ def infer(ref_style_file, style_description, caption, progress):
|
|
| 167 |
|
| 168 |
if low_vram:
|
| 169 |
# The sampling process uses more vram, so we offload everything except two modules to the cpu.
|
| 170 |
-
models_to(models_rbm, device="cpu"
|
| 171 |
|
| 172 |
progress(0.4, "Starting Stage C reverse process")
|
| 173 |
# Stage C reverse process.
|
|
@@ -283,7 +283,7 @@ def infer_compo(style_description, ref_style_file, caption, ref_sub_file, progre
|
|
| 283 |
unconditions_b = core_b.get_conditions(batch, models_b, extras_b, is_eval=True, is_unconditional=True)
|
| 284 |
|
| 285 |
if low_vram:
|
| 286 |
-
models_to(models_rbm, device="cpu"
|
| 287 |
models_to(sam_model, device="cpu")
|
| 288 |
models_to(sam_model.sam, device="cpu")
|
| 289 |
|
|
|
|
| 167 |
|
| 168 |
if low_vram:
|
| 169 |
# The sampling process uses more vram, so we offload everything except two modules to the cpu.
|
| 170 |
+
models_to(models_rbm, device="cpu")
|
| 171 |
|
| 172 |
progress(0.4, "Starting Stage C reverse process")
|
| 173 |
# Stage C reverse process.
|
|
|
|
| 283 |
unconditions_b = core_b.get_conditions(batch, models_b, extras_b, is_eval=True, is_unconditional=True)
|
| 284 |
|
| 285 |
if low_vram:
|
| 286 |
+
models_to(models_rbm, device="cpu")
|
| 287 |
models_to(sam_model, device="cpu")
|
| 288 |
models_to(sam_model.sam, device="cpu")
|
| 289 |
|