Spaces:
Running
Running
Commit
·
1df1048
1
Parent(s):
8c9386d
update
Browse files- gradio_demo/app.py +3 -3
gradio_demo/app.py
CHANGED
@@ -131,7 +131,9 @@ def instantir_restore(
|
|
131 |
map_location="cpu"
|
132 |
)
|
133 |
pipe.aggregator.load_state_dict(aggregator_state_dict, strict=True)
|
134 |
-
if
|
|
|
|
|
135 |
pipe.aggregator.to(device=device, dtype=torch_dtype)
|
136 |
|
137 |
print("******loaded")
|
@@ -147,8 +149,6 @@ def instantir_restore(
|
|
147 |
# pipe.enable_vae_tiling()
|
148 |
if cpu_offload:
|
149 |
pipe.enable_model_cpu_offload()
|
150 |
-
pipe.scheduler.to("cpu")
|
151 |
-
pipe.aggregator.to("cpu")
|
152 |
# pipe.enable_sequential_cpu_offload()
|
153 |
print('done')
|
154 |
|
|
|
131 |
map_location="cpu"
|
132 |
)
|
133 |
pipe.aggregator.load_state_dict(aggregator_state_dict, strict=True)
|
134 |
+
if cpu_offload:
|
135 |
+
pipe.aggregator.to(device="cpu")
|
136 |
+
else:
|
137 |
pipe.aggregator.to(device=device, dtype=torch_dtype)
|
138 |
|
139 |
print("******loaded")
|
|
|
149 |
# pipe.enable_vae_tiling()
|
150 |
if cpu_offload:
|
151 |
pipe.enable_model_cpu_offload()
|
|
|
|
|
152 |
# pipe.enable_sequential_cpu_offload()
|
153 |
print('done')
|
154 |
|