Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -62,11 +62,11 @@ def enable_lora(lora_scale, lora_in, lora_add):
|
|
| 62 |
if not lora_in and not lora_add:
|
| 63 |
return
|
| 64 |
else:
|
| 65 |
-
if
|
| 66 |
-
lora_add =
|
| 67 |
url = f'https://huggingface.co/{lora_add}/tree/main'
|
| 68 |
lora_name = scrape_lora_link(url)
|
| 69 |
-
pipe.
|
| 70 |
pipe.fuse_lora(lora_scale=lora_scale)
|
| 71 |
pipe.to(device="cuda", dtype=torch.bfloat16)
|
| 72 |
|
|
|
|
| 62 |
if not lora_in and not lora_add:
|
| 63 |
return
|
| 64 |
else:
|
| 65 |
+
if lora_in:
|
| 66 |
+
lora_add = lora_in
|
| 67 |
url = f'https://huggingface.co/{lora_add}/tree/main'
|
| 68 |
lora_name = scrape_lora_link(url)
|
| 69 |
+
pipe.lora_lora_weights(lora_add, weight_name=lora_name)
|
| 70 |
pipe.fuse_lora(lora_scale=lora_scale)
|
| 71 |
pipe.to(device="cuda", dtype=torch.bfloat16)
|
| 72 |
|