prithivMLmods commited on
Commit
d0a536f
·
verified ·
1 Parent(s): 293b219

update app

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -125,6 +125,10 @@ pipe.load_lora_weights("oumoumad/Qwen-Edit-2509-Material-transfer",
125
  weight_name="material-transfer_000004769.safetensors",
126
  adapter_name="material-transfer")
127
 
 
 
 
 
128
  try:
129
  pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
130
  print("Flash Attention 3 Processor set successfully.")
@@ -180,6 +184,8 @@ def infer(
180
  prompt = "Blend the product into the background, correct its perspective and lighting, and make it naturally integrated with the scene."
181
  elif lora_adapter == "Material-Transfer":
182
  prompt = "change materials of image1 to match the reference in image2"
 
 
183
 
184
  adapters_map = {
185
  "Texture Edit": "texture",
@@ -187,6 +193,7 @@ def infer(
187
  "Cloth-Design-Fuse": "shirt_design",
188
  "Super-Fusion": "fusion-x",
189
  "Material-Transfer": "material-transfer",
 
190
  }
191
 
192
  active_adapter = adapters_map.get(lora_adapter)
@@ -281,6 +288,7 @@ with gr.Blocks() as demo:
281
 
282
  gr.Examples(
283
  examples=[
 
284
  ["examples/Cloth2.jpg", "examples/Design2.png", "Put this design on their shirt.", "Cloth-Design-Fuse"],
285
  ["examples/Cup1.png", "examples/Wood1.png", "Apply wood texture to mug.", "Texture Edit"],
286
  ["examples/Cloth1.jpg", "examples/Design1.png", "Put this design on their shirt.", "Cloth-Design-Fuse"],
@@ -305,4 +313,4 @@ with gr.Blocks() as demo:
305
  )
306
 
307
  if __name__ == "__main__":
308
- demo.queue(max_size=30).launch(css=css, theme=orange_red_theme, mcp_server=True, ssr_mode=False, show_error=True)
 
125
  weight_name="material-transfer_000004769.safetensors",
126
  adapter_name="material-transfer")
127
 
128
+ pipe.load_lora_weights("dx8152/Qwen-Edit-2509-Light-Migration",
129
+ weight_name="参考色调.safetensors",
130
+ adapter_name="light-migration")
131
+
132
  try:
133
  pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
134
  print("Flash Attention 3 Processor set successfully.")
 
184
  prompt = "Blend the product into the background, correct its perspective and lighting, and make it naturally integrated with the scene."
185
  elif lora_adapter == "Material-Transfer":
186
  prompt = "change materials of image1 to match the reference in image2"
187
+ elif lora_adapter == "Light-Migration":
188
+ prompt = "Refer to the color tone, remove the original lighting from Image 1, and relight Image 1 based on the lighting and color tone of Image 2."
189
 
190
  adapters_map = {
191
  "Texture Edit": "texture",
 
193
  "Cloth-Design-Fuse": "shirt_design",
194
  "Super-Fusion": "fusion-x",
195
  "Material-Transfer": "material-transfer",
196
+ "Light-Migration": "light-migration",
197
  }
198
 
199
  active_adapter = adapters_map.get(lora_adapter)
 
288
 
289
  gr.Examples(
290
  examples=[
291
+ ["examples/M1.jpg", "examples/M2.jpg", "Refer to the color tone, remove the original lighting from Image 1, and relight Image 1 based on the lighting and color tone of Image 2.", "Light-Migration"],
292
  ["examples/Cloth2.jpg", "examples/Design2.png", "Put this design on their shirt.", "Cloth-Design-Fuse"],
293
  ["examples/Cup1.png", "examples/Wood1.png", "Apply wood texture to mug.", "Texture Edit"],
294
  ["examples/Cloth1.jpg", "examples/Design1.png", "Put this design on their shirt.", "Cloth-Design-Fuse"],
 
313
  )
314
 
315
  if __name__ == "__main__":
316
+ demo.queue(max_size=50).launch(css=css, theme=orange_red_theme, mcp_server=True, ssr_mode=False, show_error=True)