Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -198,8 +198,13 @@ def start_tryon(dict, garm_img, garment_des, is_checked, is_checked_crop, denois
198
  with torch.cuda.amp.autocast():
199
  with torch.no_grad():
200
  # 5.1 生成正面提示词嵌入
201
- prompt = "((best quality, masterpiece, ultra-detailed, high quality photography, photo realistic)), the model is wearing " + garment_des
202
- negative_prompt = "monochrome, lowres, bad anatomy, worst quality, normal quality, low quality, blurry, jpeg artifacts, sketch"
 
 
 
 
 
203
  with torch.inference_mode():
204
  # 编码提示词
205
  (
@@ -307,7 +312,7 @@ with image_blocks as demo:
307
  is_checked = gr.Checkbox(label="Yes", info="Use auto-generated mask (Takes 5 seconds)",value=True)
308
  with gr.Row():
309
  category = gr.Dropdown(
310
- choices=["upper_body", "lower_body", "dresses"],
311
  label="Category",
312
  value="upper_body"
313
  )
 
198
  with torch.cuda.amp.autocast():
199
  with torch.no_grad():
200
  # 5.1 生成正面提示词嵌入
201
+ if category == "saree":
202
+ prompt = "((best quality, ultra detailed, masterpiece)), a realistic Indian woman wearing a traditional saree with " + garment_des
203
+ negative_prompt = "monochrome, lowres, bad anatomy, worst quality, normal quality, low quality, blurry, jpeg artifacts, sketch"
204
+ else:
205
+ prompt = "((best quality, masterpiece, ultra-detailed, high quality photography, photo realistic)), the model is wearing " + garment_des
206
+ negative_prompt = "monochrome, lowres, bad anatomy, worst quality, normal quality, low quality, blurry, jpeg artifacts, sketch"
207
+
208
  with torch.inference_mode():
209
  # 编码提示词
210
  (
 
312
  is_checked = gr.Checkbox(label="Yes", info="Use auto-generated mask (Takes 5 seconds)",value=True)
313
  with gr.Row():
314
  category = gr.Dropdown(
315
+ choices=["upper_body", "lower_body", "dresses", "saree"],
316
  label="Category",
317
  value="upper_body"
318
  )