wzhouxiff commited on
Commit
128f7f2
1 Parent(s): 724f667
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -293,10 +293,10 @@ def fn_traj_reset():
293
  return "Click to specify trajectory"
294
 
295
  ###########################################
296
- model_path='./motionctrl.pth?download=true'
297
  config_path='./configs/inference/config_both.yaml'
298
  if not os.path.exists(model_path):
299
- os.system(f'wget https://huggingface.co/TencentARC/MotionCtrl/resolve/main/motionctrl.pth?download=true -P .')
300
 
301
  config = OmegaConf.load(config_path)
302
  model_config = config.pop("model", OmegaConf.create())
@@ -928,7 +928,10 @@ def main(args):
928
  traj_droplast = gr.Button(value="Drop Last Point", visible=False)
929
 
930
  with gr.Column():
931
- traj_input = gr.Image("assets/traj_layout.png", tool='sketch', source="canvas",
 
 
 
932
  width=256, height=256,
933
  label="Canvas for Drawing", visible=False)
934
  vis_traj = gr.Video(value=None, label="Trajectory", visible=False, width=256, height=256)
 
293
  return "Click to specify trajectory"
294
 
295
  ###########################################
296
+ model_path='./motionctrl.pth'
297
  config_path='./configs/inference/config_both.yaml'
298
  if not os.path.exists(model_path):
299
+ os.system(f'wget https://huggingface.co/TencentARC/MotionCtrl/blob/main/motionctrl.pth -P .')
300
 
301
  config = OmegaConf.load(config_path)
302
  model_config = config.pop("model", OmegaConf.create())
 
928
  traj_droplast = gr.Button(value="Drop Last Point", visible=False)
929
 
930
  with gr.Column():
931
+ # traj_input = gr.Image("assets/traj_layout.png", tool='sketch', source="canvas",
932
+ # width=256, height=256,
933
+ # label="Canvas for Drawing", visible=False)
934
+ traj_input = gr.Image("assets/traj_layout.png", source="canvas",
935
  width=256, height=256,
936
  label="Canvas for Drawing", visible=False)
937
  vis_traj = gr.Video(value=None, label="Trajectory", visible=False, width=256, height=256)