Issue while Recreating the Service

#6
by varad17photai - opened

Traceback (most recent call last):
File "/home/ubuntu/Varad/fast_inpaint_diffusers/main.py", line 30, in
state_dict = torch.load(model_file)
File "/home/ubuntu/Varad/fast_inpaint_diffusers/venv/lib/python3.10/site-packages/torch/serialization.py", line 1114, in load
return _legacy_load(
File "/home/ubuntu/Varad/fast_inpaint_diffusers/venv/lib/python3.10/site-packages/torch/serialization.py", line 1338, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\xa0'.

I tried to run the scripts for hosting in my personal space. But I got these issue . Can you specify the torch version or if there is any issue in it ?

Hi, this shouldn't be torch dependent if its higher than 2.1 which is old. Are you using a older pytorch? The error seems more like it fails at loading the model, did you change the model?

No the script and model is exact same as for the space . Can you provide a dockerfile for this space ? Or the exact versions of the requirements used . For cloning the environment .

it has a requirements.txt with the versions for the packages that are crucial, but if it helps, the version I have that runs locally has this installed:

accelerate==0.34.2
aiofiles==23.2.1
annotated-types==0.7.0
anyio==4.5.0
certifi==2024.8.30
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.3.0
cycler==0.12.1
diffusers==0.30.3
fastapi==0.112.4
ffmpy==0.4.0
filelock==3.13.1
fonttools==4.53.1
fsspec==2024.2.0
gradio==4.42.0
gradio_client==1.3.0
gradio_imageslider==0.0.20
h11==0.14.0
httpcore==1.0.5
httpx==0.27.2
huggingface-hub==0.25.0
idna==3.10
importlib_metadata==8.5.0
importlib_resources==6.4.5
Jinja2==3.1.3
kiwisolver==1.4.7
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.9.2
mdurl==0.1.2
mpmath==1.3.0
networkx==3.2.1
numpy==1.26.4
opencv-python==4.10.0.84
orjson==3.10.7
packaging==24.1
pandas==2.2.2
pillow==10.4.0
psutil==5.9.8
pydantic==2.9.2
pydantic_core==2.23.4
pydub==0.25.1
Pygments==2.18.0
pyparsing==3.1.4
python-dateutil==2.9.0.post0
python-multipart==0.0.9
pytz==2024.2
PyYAML==6.0.2
regex==2024.9.11
requests==2.32.3
rich==13.8.1
ruff==0.6.5
safetensors==0.4.5
semantic-version==2.10.0
setuptools==70.0.0
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
spaces==0.30.2
starlette==0.38.5
sympy==1.12
tokenizers==0.19.1
tomlkit==0.12.0
torch==2.4.1+cu124
tqdm==4.66.5
transformers==4.44.2
typer==0.12.5
typing_extensions==4.9.0
tzdata==2024.1
urllib3==2.2.3
uvicorn==0.30.6
websockets==12.0
zipp==3.20.2 

Thanks , Will test with these . @OzzyGT .

Sign up or log in to comment