Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,8 +74,10 @@ pipe.fuse_lora(adapter_names=["phantom"], lora_scale=3., components=["transforme
|
|
| 74 |
pipe.fuse_lora(adapter_names=["phantom_2"], lora_scale=1., components=["transformer_2"])
|
| 75 |
pipe.unload_lora_weights()
|
| 76 |
|
| 77 |
-
|
| 78 |
-
gc.collect()
|
|
|
|
|
|
|
| 79 |
|
| 80 |
optimize_pipeline_(pipe,
|
| 81 |
image=Image.new('RGB', (LANDSCAPE_WIDTH, LANDSCAPE_HEIGHT)),
|
|
|
|
| 74 |
pipe.fuse_lora(adapter_names=["phantom_2"], lora_scale=1., components=["transformer_2"])
|
| 75 |
pipe.unload_lora_weights()
|
| 76 |
|
| 77 |
+
for i in range(2):
|
| 78 |
+
gc.collect()
|
| 79 |
+
torch.cuda.synchronize()
|
| 80 |
+
torch.cuda.empty_cache()
|
| 81 |
|
| 82 |
optimize_pipeline_(pipe,
|
| 83 |
image=Image.new('RGB', (LANDSCAPE_WIDTH, LANDSCAPE_HEIGHT)),
|