l1na-forever / stable-diffusion-rocm-docker

Stable Diffusion Docker image preconfigured for usage with AMD Radeon cards
120 stars 20 forks source link

EOFError: Ran out of input #5

Closed yglukhov closed 1 year ago

yglukhov commented 1 year ago

Getting error on RX6800, same happens when starting from scratch:

$ docker container start -i stable-diffusion
     active environment : ldm
    active env location : /opt/conda/envs/ldm
Installing PyTorch ROCM5.1.1 version..
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/rocm5.1.1
Requirement already satisfied: torch in /opt/conda/envs/ldm/lib/python3.8/site-packages (1.12.1+rocm5.1.1)
Requirement already satisfied: torchvision in /opt/conda/envs/ldm/lib/python3.8/site-packages (0.13.1+rocm5.1.1)
Requirement already satisfied: typing-extensions in /opt/conda/envs/ldm/lib/python3.8/site-packages (from torch) (4.3.0)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /opt/conda/envs/ldm/lib/python3.8/site-packages (from torchvision) (9.2.0)
Requirement already satisfied: numpy in /opt/conda/envs/ldm/lib/python3.8/site-packages (from torchvision) (1.22.3)
Requirement already satisfied: requests in /opt/conda/envs/ldm/lib/python3.8/site-packages (from torchvision) (2.25.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/conda/envs/ldm/lib/python3.8/site-packages (from requests->torchvision) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/envs/ldm/lib/python3.8/site-packages (from requests->torchvision) (2022.9.24)
Requirement already satisfied: idna<3,>=2.5 in /opt/conda/envs/ldm/lib/python3.8/site-packages (from requests->torchvision) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2 in /opt/conda/envs/ldm/lib/python3.8/site-packages (from requests->torchvision) (4.0.0)
Done installing PyTorch ROCM
Validating model files...
checking model.ckpt...
Downloading: https://www.googleapis.com/storage/v1/b/aai-blog-files/o/sd-v1-4.ckpt?alt=media please wait...
Username/Password Authentication Failed.
saved model.ckpt
checking GFPGANv1.3.pth...
GFPGANv1.3.pth is valid!

checking RealESRGAN_x4plus.pth...
RealESRGAN_x4plus.pth is valid!

checking RealESRGAN_x4plus_anime_6B.pth...
RealESRGAN_x4plus_anime_6B.pth is valid!

checking project.yaml...
project.yaml is valid!

checking model.ckpt...
model.ckpt is valid!

entrypoint.sh: Run python scripts/webui.py ...
Found GFPGAN
Found RealESRGAN
Found LDSR
Loading model from models/ldm/stable-diffusion-v1/model.ckpt
Traceback (most recent call last):
  File "scripts/webui.py", line 503, in <module>
    model, device,config = load_SD_model()
  File "scripts/webui.py", line 494, in load_SD_model
    model = load_model_from_config(config, opt.ckpt)
  File "scripts/webui.py", line 181, in load_model_from_config
    pl_sd = torch.load(ckpt, map_location="cpu")
  File "/opt/conda/envs/ldm/lib/python3.8/site-packages/torch/serialization.py", line 713, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/opt/conda/envs/ldm/lib/python3.8/site-packages/torch/serialization.py", line 920, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input
entrypoint.sh: Process is ending. Relaunching in 0.5s...
entrypoint.sh: Run python scripts/webui.py ...
Relaunch count: 1
Found GFPGAN
...
l1na-forever commented 1 year ago

Hi Yuriy, I'm wondering if you're being blocked from accessing the stable diffusion checkpoints from Google's host:

Downloading: https://www.googleapis.com/storage/v1/b/aai-blog-files/o/sd-v1-4.ckpt?alt=media please wait...
Username/Password Authentication Failed.
saved model.ckpt

The later output does suggest that the model was saved, but it's possible the webui build's validation logic isn't quite right.

Either way, can you give the docker image l1naforever/stable-diffusion-rocm:baked a shot (use the baked tag instead of latest - they're both on the same commit level)?

yglukhov commented 1 year ago

Thanks for your reply, I haven't noticed the download error in my log, and indeed downloading https://www.googleapis.com/storage/v1/b/aai-blog-files/o/sd-v1-4.ckpt?alt=media yields Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object.. I've just tried the baked image, and it is working perfectly. Thanks a lot!