Does not work with docker

#13
by 0xC4DE - opened

I'm not exectly sure where the issue is but when running with docker, and using the interface. Attempting to render a video will result in an error that looks like the following:

Started... python run.py --execution-providers cpu -s /tmp/gradio/fe23ac6e67b762e65febcea15cf409d0df3dd585/image.png -t /tmp/gradio/2810442405ccfd922b8e3251cdd154c702b25318/video.mp4 -o ./output/bdf4f05e-5d07-48aa-9d97-67d336a182c1/video.mp4 --frame-processors  --face-analyser-direction left-right --face-recognition reference --keep-fps --keep-temp

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1438, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1339, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "/home/user/.local/lib/python3.10/site-packages/gradio/components/video.py", line 281, in postprocess
    processed_files = (self._format_video(y), None)
  File "/home/user/.local/lib/python3.10/site-packages/gradio/components/video.py", line 355, in _format_video
    video = self.make_temp_copy_if_needed(video)
  File "/home/user/.local/lib/python3.10/site-packages/gradio/components/base.py", line 226, in make_temp_copy_if_needed
    temp_dir = self.hash_file(file_path)
  File "/home/user/.local/lib/python3.10/site-packages/gradio/components/base.py", line 190, in hash_file
    with open(file_path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: './output/bdf4f05e-5d07-48aa-9d97-67d336a182c1/video.mp4'

While it looks like the output isn't being generated the actual issue is the command used to try to generate the video, particularly with "--frame-processors". It requires an option, but none is given. Not sure how to fix. Best.

@0xC4DE Thank you for highlighting the issue.

When you Click start button in video tab check whether you have selected any frame processer or not.

Below is the code for frame processer checkbox:
frame_processor_checkbox = gr.CheckboxGroup(
choices = ['face_swapper', 'face_enhancer', 'frame_enhancer'],
label = 'FRAME PROCESSORS',
value = ['face_swapper'] # Default value
)

Sign up or log in to comment