YaArtemNosenko commited on
Commit
df9c90f
·
verified ·
1 Parent(s): 45f5fad

[DEBUG] Debug app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -151,7 +151,8 @@ def infer(
151
  'height': height,
152
  'generator': generator
153
  }
154
- pipe = load_pipeline(lora_scale,
 
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
- # This assumes your pipeline's unet has a method to update the LoRA scale.
167
- if hasattr(pipe.unet, "set_lora_scale"):
168
- pipe.unet.set_lora_scale(lora_scale)
169
- else:
170
- print("Warning: LoRA scale adjustment method not found on UNet.")
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