Spaces:
Running
on
Zero
Running
on
Zero
Yardenfren
commited on
Commit
•
698aefd
1
Parent(s):
9175f99
Update inf.py
Browse files
inf.py
CHANGED
@@ -42,7 +42,7 @@ class InferencePipeline:
|
|
42 |
style_alpha: float) -> None:
|
43 |
try:
|
44 |
# Get Content B-LoRA SD
|
45 |
-
if content_lora_model_id:
|
46 |
content_B_LoRA_sd, _ = self.pipe.lora_state_dict(content_lora_model_id, use_auth_token=self.hf_token)
|
47 |
content_B_LoRA = filter_lora(content_B_LoRA_sd, BLOCKS['content'])
|
48 |
content_B_LoRA = scale_lora(content_B_LoRA, content_alpha)
|
@@ -50,7 +50,7 @@ class InferencePipeline:
|
|
50 |
content_B_LoRA = {}
|
51 |
|
52 |
# Get Style B-LoRA SD
|
53 |
-
if style_lora_model_id:
|
54 |
style_B_LoRA_sd, _ = self.pipe.lora_state_dict(style_lora_model_id, use_auth_token=self.hf_token)
|
55 |
style_B_LoRA = filter_lora(style_B_LoRA_sd, BLOCKS['style'])
|
56 |
style_B_LoRA = scale_lora(style_B_LoRA, style_alpha)
|
|
|
42 |
style_alpha: float) -> None:
|
43 |
try:
|
44 |
# Get Content B-LoRA SD
|
45 |
+
if content_lora_model_id and content_lora_model_id != 'None':
|
46 |
content_B_LoRA_sd, _ = self.pipe.lora_state_dict(content_lora_model_id, use_auth_token=self.hf_token)
|
47 |
content_B_LoRA = filter_lora(content_B_LoRA_sd, BLOCKS['content'])
|
48 |
content_B_LoRA = scale_lora(content_B_LoRA, content_alpha)
|
|
|
50 |
content_B_LoRA = {}
|
51 |
|
52 |
# Get Style B-LoRA SD
|
53 |
+
if style_lora_model_id and style_lora_model_id != 'None':
|
54 |
style_B_LoRA_sd, _ = self.pipe.lora_state_dict(style_lora_model_id, use_auth_token=self.hf_token)
|
55 |
style_B_LoRA = filter_lora(style_B_LoRA_sd, BLOCKS['style'])
|
56 |
style_B_LoRA = scale_lora(style_B_LoRA, style_alpha)
|