Rerender_A_Video icon indicating copy to clipboard operation
Rerender_A_Video copied to clipboard

Issue with Model Loading in Rerender_A_Video Script

Open BryanHarrisScripts opened this issue 1 year ago • 4 comments

I hope this message finds you well. I wanted to bring to your attention an issue I've been experiencing while trying to run the Rerender_A_Video script as per the provided instructions. Below, I've detailed the problem and the steps I've taken so far.

When I attempt to run the Rerender_A_Video script using the provided configuration file real2sculpture.json without specifying a custom model file, I encounter an error related to model loading. The error message I receive is as follows:

No module 'xformers'. Proceeding without it.
ControlLDM: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Loaded model config from [./deps/ControlNet/models/cldm_v15.yaml]
Loaded state_dict from [./models/control_sd15_canny.pth]
Traceback (most recent call last):
  File "C:\Users\bryan\Rerender_A_Video\rerender.py", line 462, in <module>
    rerender(cfg, args.one, args.key_video_path)
  File "C:\Users\bryan\Rerender_A_Video\rerender.py", line 89, in rerender
    model.load_state_dict(load_file(cfg.sd_model), strict=False)
                          ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\bryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\safetensors\torch.py", line 98, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: The system cannot find the file specified. (os error 2)

Steps Taken So Far:

  1. I have followed the provided instructions for setting up the environment, including running the installation script to download the required models and dependencies.

  2. I ensured that CUDA 11.8 is installed and checked for GPU availability using torch.cuda.is_available().

  3. I have made sure that the required libraries and packages are installed, as confirmed using pip list.

  4. I have attempted to run the script both with and without specifying a custom model file. The issue persists in both cases.

  5. I have verified the existence of the model file control_sd15_canny.pth in the specified directory.

Despite following the provided steps and confirming that the model file exists, the script encounters issues during model loading.

I kindly request your assistance in resolving this issue. If you require any additional information or logs to diagnose the problem, please let me know, and I will be happy to provide them.

BryanHarrisScripts avatar Sep 18 '23 05:09 BryanHarrisScripts