InstantID icon indicating copy to clipboard operation
InstantID copied to clipboard

cog.server.exceptions.FatalWorkerException: Predictor errored during setup: Error no file named diffusion_pytorch_model.bin found in directory ./checkpoints/ControlNetModel.

Open kacperadach opened this issue 1 year ago • 3 comments

Getting this error after trying to run the model on Replicate. Have not made any modifications to the code and I have the models/checkpoints downloaded.

File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/cog/predictor.py", line 70, in run_setup
predictor.setup()
File "/src/cog/predict.py", line 100, in setup
self.controlnet = ControlNetModel.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/diffusers/models/modeling_utils.py", line 777, in from_pretrained
model_file = _get_model_file(
^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/diffusers/utils/hub_utils.py", line 272, in _get_model_file
raise EnvironmentError(
OSError: Error no file named diffusion_pytorch_model.bin found in directory ./checkpoints/ControlNetModel.
Traceback (most recent call last):
  File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/cog/server/runner.py", line 317, in setup
    for event in worker.setup():
  File "/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/cog/server/worker.py", line 126, in _wait
    raise FatalWorkerException(raise_on_error + ": " + done.error_detail)
cog.server.exceptions.FatalWorkerException: Predictor errored during setup: Error no file named diffusion_pytorch_model.bin found in directory ./checkpoints/ControlNetModel.

kacperadach avatar Jan 30 '24 17:01 kacperadach

I had the same problem

gonghaohuang avatar Feb 01 '24 12:02 gonghaohuang

@gonghaohuang I fixed the issue. The file was symlink to a different cache location. I just moved the actual file into the checkpoints cache and then it started working.

kacperadach avatar Feb 03 '24 03:02 kacperadach

@gonghaohuang I fixed the issue. The file was symlink to a different cache location. I just moved the actual file into the checkpoints cache and then it started working.

could you show me your files structure ? i have the same problem

aibear-huang avatar Feb 05 '24 06:02 aibear-huang