Spaces:
Sleeping
Sleeping
[DEBUG] Debug app.py
Browse files
app.py
CHANGED
@@ -151,7 +151,8 @@ def infer(
|
|
151 |
'height': height,
|
152 |
'generator': generator
|
153 |
}
|
154 |
-
pipe = load_pipeline(
|
|
|
155 |
controlnet_checkbox,
|
156 |
controlnet_mode,
|
157 |
ip_adapter_checkbox,
|
@@ -162,12 +163,12 @@ def infer(
|
|
162 |
seed = random.randint(0, MAX_SEED)
|
163 |
|
164 |
# If using the LoRA model, update the LoRA scale if supported.
|
165 |
-
if model_id == "YaArtemNosenko/dino_stickers":
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
# если используем controlnet
|
172 |
if controlnet_checkbox:
|
173 |
params['image'] = controlnet_image
|
|
|
151 |
'height': height,
|
152 |
'generator': generator
|
153 |
}
|
154 |
+
pipe = load_pipeline(model_id,
|
155 |
+
lora_scale,
|
156 |
controlnet_checkbox,
|
157 |
controlnet_mode,
|
158 |
ip_adapter_checkbox,
|
|
|
163 |
seed = random.randint(0, MAX_SEED)
|
164 |
|
165 |
# If using the LoRA model, update the LoRA scale if supported.
|
166 |
+
# if model_id == "YaArtemNosenko/dino_stickers":
|
167 |
+
# # This assumes your pipeline's unet has a method to update the LoRA scale.
|
168 |
+
# if hasattr(pipe.unet, "set_lora_scale"):
|
169 |
+
# pipe.unet.set_lora_scale(lora_scale)
|
170 |
+
# else:
|
171 |
+
# print("Warning: LoRA scale adjustment method not found on UNet.")
|
172 |
# если используем controlnet
|
173 |
if controlnet_checkbox:
|
174 |
params['image'] = controlnet_image
|