prithivMLmods commited on
Commit
7721187
·
verified ·
1 Parent(s): e232fd9

update app

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -117,6 +117,10 @@ pipe.load_lora_weights("ostris/qwen_image_edit_2509_shirt_design",
117
  weight_name="qwen_image_edit_2509_shirt_design.safetensors",
118
  adapter_name="shirt_design")
119
 
 
 
 
 
120
  try:
121
  pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
122
  print("Flash Attention 3 Processor set successfully.")
@@ -168,11 +172,14 @@ def infer(
168
  prompt = "Apply texture to object."
169
  elif lora_adapter == "Fuse-Objects":
170
  prompt = "Fuse object into background."
171
-
 
 
172
  adapters_map = {
173
  "Texture Edit": "texture",
174
  "Fuse-Objects": "fusion",
175
  "Cloth-Design-Fuse": "shirt_design",
 
176
  }
177
 
178
  active_adapter = adapters_map.get(lora_adapter)
@@ -262,7 +269,7 @@ with gr.Blocks(css=css, theme=orange_red_theme) as demo:
262
  with gr.Row():
263
  lora_adapter = gr.Dropdown(
264
  label="Choose Editing Style",
265
- choices=["Texture Edit", "Fuse-Objects", "Cloth-Design-Fuse"],
266
  value="Texture Edit",
267
  )
268
 
@@ -270,6 +277,7 @@ with gr.Blocks(css=css, theme=orange_red_theme) as demo:
270
  examples=[
271
  ["examples/Cloth2.jpg", "examples/Design2.png", "Put this design on their shirt.", "Cloth-Design-Fuse"],
272
  ["examples/Cup1.png", "examples/Wood1.png", "Apply wood texture to mug.", "Texture Edit"],
 
273
  ["examples/Mug1.jpg", "examples/Texture1.jpg", "Apply the design from image 2 to the mug.", "Texture Edit"],
274
  ["examples/Cat1.jpg", "examples/Glass1.webp", "A cat wearing glasses in image 2.", "Fuse-Objects"],
275
  ["examples/Cloth1.jpg", "examples/Design1.png", "Put this design on their shirt.", "Cloth-Design-Fuse"],
 
117
  weight_name="qwen_image_edit_2509_shirt_design.safetensors",
118
  adapter_name="shirt_design")
119
 
120
+ pipe.load_lora_weights("eggnog/Qwen-Edit-2509-Stereogram_LoRa",
121
+ weight_name=" stereo.safetensors",
122
+ adapter_name="stereogram")
123
+
124
  try:
125
  pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
126
  print("Flash Attention 3 Processor set successfully.")
 
172
  prompt = "Apply texture to object."
173
  elif lora_adapter == "Fuse-Objects":
174
  prompt = "Fuse object into background."
175
+ elif lora_adapter == "Stereogram":
176
+ prompt = "Make Stereogram."
177
+
178
  adapters_map = {
179
  "Texture Edit": "texture",
180
  "Fuse-Objects": "fusion",
181
  "Cloth-Design-Fuse": "shirt_design",
182
+ "Stereogram": "stereogram",
183
  }
184
 
185
  active_adapter = adapters_map.get(lora_adapter)
 
269
  with gr.Row():
270
  lora_adapter = gr.Dropdown(
271
  label="Choose Editing Style",
272
+ choices=["Texture Edit", "Fuse-Objects", "Cloth-Design-Fuse", "Stereogram"],
273
  value="Texture Edit",
274
  )
275
 
 
277
  examples=[
278
  ["examples/Cloth2.jpg", "examples/Design2.png", "Put this design on their shirt.", "Cloth-Design-Fuse"],
279
  ["examples/Cup1.png", "examples/Wood1.png", "Apply wood texture to mug.", "Texture Edit"],
280
+ ["examples/S1.jpg", "examples/S2.jpg", "Make Stereogram.", "Stereogram"],
281
  ["examples/Mug1.jpg", "examples/Texture1.jpg", "Apply the design from image 2 to the mug.", "Texture Edit"],
282
  ["examples/Cat1.jpg", "examples/Glass1.webp", "A cat wearing glasses in image 2.", "Fuse-Objects"],
283
  ["examples/Cloth1.jpg", "examples/Design1.png", "Put this design on their shirt.", "Cloth-Design-Fuse"],