Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -96,7 +96,7 @@ def infer (custom_model, weight_name, prompt, inf_steps, guidance_scale, width,
|
|
| 96 |
use_auth_token = True
|
| 97 |
)
|
| 98 |
|
| 99 |
-
|
| 100 |
|
| 101 |
if seed < 0 :
|
| 102 |
seed = random.randint(0, 423538377342)
|
|
@@ -113,7 +113,7 @@ def infer (custom_model, weight_name, prompt, inf_steps, guidance_scale, width,
|
|
| 113 |
cross_attention_kwargs={"scale": lora_weight}
|
| 114 |
).images[0]
|
| 115 |
|
| 116 |
-
|
| 117 |
|
| 118 |
return image, seed
|
| 119 |
|
|
|
|
| 96 |
use_auth_token = True
|
| 97 |
)
|
| 98 |
|
| 99 |
+
pipe.fuse_lora()
|
| 100 |
|
| 101 |
if seed < 0 :
|
| 102 |
seed = random.randint(0, 423538377342)
|
|
|
|
| 113 |
cross_attention_kwargs={"scale": lora_weight}
|
| 114 |
).images[0]
|
| 115 |
|
| 116 |
+
pipe.unfuse_lora()
|
| 117 |
|
| 118 |
return image, seed
|
| 119 |
|