Spaces:
Running
on
Zero
Running
on
Zero
forplaytvplus
commited on
Commit
•
ccb155c
1
Parent(s):
27d2695
Update app.py
Browse files
app.py
CHANGED
@@ -135,15 +135,7 @@ def generate(
|
|
135 |
pipe.load_lora_weights(lora2, adapter_name="2")
|
136 |
pipe.set_adapters(["1", "2"], adapter_weights=[lora_scale, lora_scale2])
|
137 |
|
138 |
-
|
139 |
-
pipe.enable_model_cpu_offload()
|
140 |
-
|
141 |
-
else:
|
142 |
-
pipe.to(device)
|
143 |
-
|
144 |
-
if USE_TORCH_COMPILE:
|
145 |
-
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
|
146 |
-
|
147 |
generator = torch.Generator().manual_seed(seed)
|
148 |
|
149 |
if not use_negative_prompt:
|
|
|
135 |
pipe.load_lora_weights(lora2, adapter_name="2")
|
136 |
pipe.set_adapters(["1", "2"], adapter_weights=[lora_scale, lora_scale2])
|
137 |
|
138 |
+
pipe.enable_model_cpu_offload()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
generator = torch.Generator().manual_seed(seed)
|
140 |
|
141 |
if not use_negative_prompt:
|