franciszzj commited on
Commit
af8b34b
1 Parent(s): 97d323b

update app

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -105,8 +105,7 @@ class LeffaPredictor(object):
105
  # gen_image.save("gen_image.png")
106
  return np.array(gen_image)
107
 
108
- def leffa_predict_vt(self, src_image_path, ref_image_path, step, scale, seed, vt_model_type="viton_hd"):
109
- self.change_vt_model(vt_model_type)
110
  return self.leffa_predict(src_image_path, ref_image_path, "virtual_tryon", step, scale, seed)
111
 
112
  def leffa_predict_pt(self, src_image_path, ref_image_path, step, scale, seed):
@@ -192,14 +191,8 @@ if __name__ == "__main__":
192
  vt_seed = gr.Number(
193
  label="Random Seed", minimum=-1, maximum=2147483647, step=1, value=42)
194
 
195
- vt_model_type = gr.Radio(
196
- choices=["viton_hd", "dress_code"],
197
- value="viton_hd",
198
- label="Model Type",
199
- )
200
-
201
  vt_gen_button.click(fn=leffa_predictor.leffa_predict_vt, inputs=[
202
- vt_src_image, vt_ref_image, vt_step, vt_scale, vt_seed, vt_model_type], outputs=[vt_gen_image])
203
 
204
  with gr.Tab("Control Pose (Pose Transfer)"):
205
  with gr.Row():
 
105
  # gen_image.save("gen_image.png")
106
  return np.array(gen_image)
107
 
108
+ def leffa_predict_vt(self, src_image_path, ref_image_path, step, scale, seed):
 
109
  return self.leffa_predict(src_image_path, ref_image_path, "virtual_tryon", step, scale, seed)
110
 
111
  def leffa_predict_pt(self, src_image_path, ref_image_path, step, scale, seed):
 
191
  vt_seed = gr.Number(
192
  label="Random Seed", minimum=-1, maximum=2147483647, step=1, value=42)
193
 
 
 
 
 
 
 
194
  vt_gen_button.click(fn=leffa_predictor.leffa_predict_vt, inputs=[
195
+ vt_src_image, vt_ref_image, vt_step, vt_scale, vt_seed], outputs=[vt_gen_image])
196
 
197
  with gr.Tab("Control Pose (Pose Transfer)"):
198
  with gr.Row():