feishen29 commited on
Commit
732ef1c
1 Parent(s): 107eaea

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -169,7 +169,7 @@ def resize_img(input_image, max_side=640, min_side=512, size=None,
169
 
170
  @spaces.GPU
171
  def dress_process(garm_img, face_img, pose_img, prompt, cloth_guidance_scale, caption_guidance_scale,
172
- face_guidance_scale,self_guidance_scale, cross_guidance_scale,if_ipa, if_post, if_control, denoise_steps, seed=42):
173
  # image_face_fusion = pipeline('face_fusion_torch', model='damo/cv_unet_face_fusion_torch',model_revision='v1.0.0')
174
  if prompt is None:
175
  prompt = "a photography of a model"
@@ -300,7 +300,7 @@ with image_blocks as demo:
300
  )
301
  # with gr.Row():
302
  # is_checked_postprocess = gr.Checkbox(label="Yes", info="Use postprocess ", value=False)
303
- is_checked_postprocess = False
304
  with gr.Column():
305
  pose_img = gr.Image(label="Pose", sources='upload', type="pil")
306
  with gr.Row():
@@ -353,7 +353,7 @@ with image_blocks as demo:
353
  denoise_steps = gr.Number(label="Denoising Steps", minimum=20, maximum=50, value=30, step=1)
354
  seed = gr.Number(label="Seed", minimum=-1, maximum=2147483647, step=1, value=20240508)
355
 
356
- try_button.click(fn=dress_process, inputs=[garm_img, imgs, pose_img, prompt, cloth_guidance_scale, caption_guidance_scale, face_guidance_scale,self_guidance_scale, cross_guidance_scale, is_checked_face, is_checked_postprocess, is_checked_pose, denoise_steps, seed],
357
  outputs=[image_out], api_name='IMAGDressing-v1')
358
 
359
  image_blocks.launch()
 
169
 
170
  @spaces.GPU
171
  def dress_process(garm_img, face_img, pose_img, prompt, cloth_guidance_scale, caption_guidance_scale,
172
+ face_guidance_scale,self_guidance_scale, cross_guidance_scale,if_ipa, if_control, denoise_steps, seed=42):
173
  # image_face_fusion = pipeline('face_fusion_torch', model='damo/cv_unet_face_fusion_torch',model_revision='v1.0.0')
174
  if prompt is None:
175
  prompt = "a photography of a model"
 
300
  )
301
  # with gr.Row():
302
  # is_checked_postprocess = gr.Checkbox(label="Yes", info="Use postprocess ", value=False)
303
+
304
  with gr.Column():
305
  pose_img = gr.Image(label="Pose", sources='upload', type="pil")
306
  with gr.Row():
 
353
  denoise_steps = gr.Number(label="Denoising Steps", minimum=20, maximum=50, value=30, step=1)
354
  seed = gr.Number(label="Seed", minimum=-1, maximum=2147483647, step=1, value=20240508)
355
 
356
+ try_button.click(fn=dress_process, inputs=[garm_img, imgs, pose_img, prompt, cloth_guidance_scale, caption_guidance_scale, face_guidance_scale,self_guidance_scale, cross_guidance_scale, is_checked_face, is_checked_pose, denoise_steps, seed],
357
  outputs=[image_out], api_name='IMAGDressing-v1')
358
 
359
  image_blocks.launch()