AbdBarho / stable-diffusion-webui-docker

Easy Docker setup for Stable Diffusion with user-friendly UI
Other
6.76k stars 1.13k forks source link

no src folder in stable-diffusion directory after image creation #2

Closed turtleizzy closed 2 years ago

turtleizzy commented 2 years ago

Following error poped up after building image.

ln: failed to create symbolic link '/stable-diffusion/src/gfpgan/experiments/pretrained_models/GFPGANv1.3.pth': No such file or directory
(base) root@f6e4124011d3:/stable-diffusion# ls 
 LICENSE                       README.md                           assets    data               latent_diffusion.egg-info   ldm.cmd   models                optimizedSD   scripts    txt2img.yaml   webuildm.cmd
'Launch Waifu Diffusion.lnk'   Stable_Diffusion_v1_Model_Card.md   configs   environment.yaml   ldm                         main.py   notebook_helpers.py   run.cmd       setup.py   webui.cmd
AbdBarho commented 2 years ago

What does your models folder contain? Did you download GFPGANv1.3.pth and put it into the models folder?

I have just pushed an update that makes the additional models optional, an error will be thrown in the console but that is okay. Can you try again from the latest master?

turtleizzy commented 2 years ago

Yes, I did have all the models in models/ folder. Fixed by adding mkdir prior to ln.

CMD mkdir -p /stable-diffusion/models/ldm/stable-diffusion-v1 && ln -sf /models/model.ckpt /stable-diffusion/models/ldm/stable-diffusion-v1/model.ckpt && \
  mkdir -p  /stable-diffusion/src/gfpgan/experiments/pretrained_models && ln -sf /models/GFPGANv1.3.pth   /stable-diffusion/src/gfpgan/experiments/pretrained_models/GFPGANv1.3.pth && \
  mkdir -p  /stable-diffusion/src/realesrgan/experiments/pretrained_models/ && ln -sf /models/RealESRGAN_x4plus.pth   /stable-diffusion/src/realesrgan/experiments/pretrained_models/RealESRGAN_x4plus.pth && \
AbdBarho commented 2 years ago

Great! I have adapted your code and added it into the docker file.

https://github.com/AbdBarho/stable-diffusion-webui-docker/commit/2ecfb0fe59220d59b1cc41c9e786946a18efd003

Thanks!