sdbds / magic-animate-for-windows

MagicAnimate: Temporally Consistent Human Image Animation using Diffusion Model
https://showlab.github.io/magicanimate/
BSD 3-Clause "New" or "Revised" License
318 stars 27 forks source link

[FileNotFoundError] I would like to try running it locally. Could you please help. #13

Open DongJu-Na opened 9 months ago

DongJu-Na commented 9 months ago
(venv) PS C:\magic-animate-for-windows-main> .\run_gui.ps1
Running on local URL:  http://127.0.0.1:7860
Running on public URL: https://d18cabb55d0e6cea6e.gradio.live

This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)
Traceback (most recent call last):
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\queueing.py", line 456, in call_prediction
    output = await route_utils.call_process_api(
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api        
    output = await app.get_blocks().process_api(
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\blocks.py", line 1531, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\blocks.py", line 1421, in postprocess_data
    outputs_cached = processing_utils.move_files_to_cache(prediction_value, block, postprocess=True)  # type: ignore
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\processing_utils.py", line 279, in move_files_to_cache
    return client_utils.traverse(data, _move_to_cache, client_utils.is_file_obj)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio_client\utils.py", line 791, in traverse
    new_obj[key] = traverse(value, func, is_root)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio_client\utils.py", line 787, in traverse
    return func(json_obj)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\processing_utils.py", line 271, in _move_to_cache
    temp_file_path = move_resource_to_block_cache(payload.path, block)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\processing_utils.py", line 248, in move_resource_to_block_cache
    return block.move_resource_to_block_cache(url_or_file_path)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\blocks.py", line 257, in move_resource_to_block_cache
    temp_file_path = processing_utils.save_file_to_cache(
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\processing_utils.py", line 185, in save_file_to_cache
    temp_dir = hash_file(file_path)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\processing_utils.py", line 117, in hash_file
    with open(file_path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\magic-animate-for-windows-main\\demo\\outputs\\2023-12-13T12-57-36.mp4'
Traceback (most recent call last):
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\queueing.py", line 456, in call_prediction
    output = await route_utils.call_process_api(
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api
    output = await app.get_blocks().process_api(
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\blocks.py", line 1531, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\blocks.py", line 1421, in postprocess_data
    outputs_cached = processing_utils.move_files_to_cache(prediction_value, block, postprocess=True)  # type: ignore
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\processing_utils.py", line 279, in move_files_to_cache
    return client_utils.traverse(data, _move_to_cache, client_utils.is_file_obj)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio_client\utils.py", line 791, in traverse
    new_obj[key] = traverse(value, func, is_root)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio_client\utils.py", line 787, in traverse
    return func(json_obj)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\processing_utils.py", line 271, in _move_to_cache
exception:

Traceback (most recent call last):
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\queueing.py", line 501, in process_events
    response = await self.call_prediction(awake_events, batch)
  File "C:\magic-animate-for-windows-main\venv\lib\site-packages\gradio\queueing.py", line 465, in call_prediction
    raise Exception(str(error) if show_error else None) from error
Exception: None

Did I miss any code that I need to install or modify? It cannot be run locally. When I create a video, I get an error saying the file cannot be found.

sdbds commented 9 months ago

Did u install ffmpeg?it needs restart.

DongJu-Na commented 9 months ago

ffmpeg is installed. Environment variables are also well set.

It seems like what I don't have installed is CUDA.

However, I asked a question because the video file itself was not created and an error occurred because it could not be found in the path.

Will installing CUDA fix that error?

The graphics card is using gtx 1650.

Thanks for your reply. 😊