Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def load_b_lora_to_unet(pipe, content_lora_model_id: str = '', style_lora_model_
|
|
| 22 |
try:
|
| 23 |
# Get Content B-LoRA SD
|
| 24 |
if content_lora_model_id:
|
| 25 |
-
content_B_LoRA_sd, _ = pipe.lora_state_dict(content_lora_model_id)
|
| 26 |
content_B_LoRA = filter_lora(content_B_LoRA_sd, BLOCKS['content'])
|
| 27 |
content_B_LoRA = scale_lora(content_B_LoRA, content_alpha)
|
| 28 |
else:
|
|
@@ -30,7 +30,7 @@ def load_b_lora_to_unet(pipe, content_lora_model_id: str = '', style_lora_model_
|
|
| 30 |
|
| 31 |
# Get Style B-LoRA SD
|
| 32 |
if style_lora_model_id:
|
| 33 |
-
style_B_LoRA_sd, _ = pipe.lora_state_dict(style_lora_model_id)
|
| 34 |
style_B_LoRA = filter_lora(style_B_LoRA_sd, BLOCKS['style'])
|
| 35 |
style_B_LoRA = scale_lora(style_B_LoRA, style_alpha)
|
| 36 |
else:
|
|
|
|
| 22 |
try:
|
| 23 |
# Get Content B-LoRA SD
|
| 24 |
if content_lora_model_id:
|
| 25 |
+
content_B_LoRA_sd, _ = pipe.lora_state_dict(content_lora_model_id, use_auth_token=True)
|
| 26 |
content_B_LoRA = filter_lora(content_B_LoRA_sd, BLOCKS['content'])
|
| 27 |
content_B_LoRA = scale_lora(content_B_LoRA, content_alpha)
|
| 28 |
else:
|
|
|
|
| 30 |
|
| 31 |
# Get Style B-LoRA SD
|
| 32 |
if style_lora_model_id:
|
| 33 |
+
style_B_LoRA_sd, _ = pipe.lora_state_dict(style_lora_model_id, use_auth_token=True)
|
| 34 |
style_B_LoRA = filter_lora(style_B_LoRA_sd, BLOCKS['style'])
|
| 35 |
style_B_LoRA = scale_lora(style_B_LoRA, style_alpha)
|
| 36 |
else:
|