Model setup failed
tzktz opened this issue · 6 comments
Hi @tzktz. Can you share any information to help us understand what broke?
If you navigate to the model version you pushed on replicate.com, you should see a "Setup Logs" tab. If you share the logs of a failed setup run, that'd give us something to go off of.
![Screenshot 2024-02-20 at 06 25 36](https://private-user-images.githubusercontent.com/7659/306297105-fa141bc1-66a2-43be-bd22-bad760e37c90.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTA1Nzg3NzUsIm5iZiI6MTcxMDU3ODQ3NSwicGF0aCI6Ii83NjU5LzMwNjI5NzEwNS1mYTE0MWJjMS02NmEyLTQzYmUtYmQyMi1iYWQ3NjBlMzdjOTAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDMxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDAzMTZUMDg0MTE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTQ4OGY2ZGE0NmY1ZmZmN2M2MjhmMTA4Y2Y5YzY0M2Y3ZmFlZWViMjY5MmIyNWZhZjg3YWRmOTZjYzI2MzA3ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.28N2TlF6dj7CbdKqahYjve9owDXU-y0ZgmnOvkkqya0)
Hi @tzktz. Can you share any information to help us understand what broke?
If you navigate to the model version you pushed on replicate.com, you should see a "Setup Logs" tab. If you share the logs of a failed setup run, that'd give us something to go off of.
![]()
Hi @mattt .
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/cog/server/worker.py", line 185, in _setup
run_setup(self._predictor)
File "/usr/local/lib/python3.10/site-packages/cog/predictor.py", line 70, in run_setup
predictor.setup()
File "/src/predict.py", line 67, in setup
self.face_enhancer = gfpgan.GFPGANer(model_path='weights/GFPGANv1.4.pth', upscale=1)
File "/usr/local/lib/python3.10/site-packages/gfpgan/utils.py", line 79, in __init__
self.face_helper = FaceRestoreHelper(
File "/usr/local/lib/python3.10/site-packages/facexlib/utils/face_restoration_helper.py", line 99, in __init__
self.face_det = init_detection_model(det_model, half=False, device=self.device, model_rootpath=model_rootpath)
File "/usr/local/lib/python3.10/site-packages/facexlib/detection/__init__.py", line 22, in init_detection_model
load_net = torch.load(model_path, map_location=lambda storage, loc: storage)
File "/usr/local/lib/python3.10/site-packages/torch/serialization.py", line 815, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.10/site-packages/torch/serialization.py", line 1033, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/cog/server/runner.py", line 317, in setup
for event in worker.setup():
File "/usr/local/lib/python3.10/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: Ran out of input
The error i got from setup log
@tzktz It looks like the model is attempting to unpickle a file and getting EOFError: Ran out of input
. This can happen if the file is empty or missing.
@tzktz Downloading files from the internet at setup time can fail for a number of reasons. The error you shared is consistent with one of those files failing to download. Why not cache those in the image at build time?
@tzktz Sorry, I can't help you with that. You can try asking on Discord if you aren't able to get it working.
Since this is the repo for the Python client, and this is a problem specifically with a model, I'm going to go ahead and close this issue. Let me know if you hit any other snags with the client library 😄