fffiloni commited on
Commit
0adf250
·
verified ·
1 Parent(s): 67d94fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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: