gbtb / nix-stable-diffusion

Flake for running SD on NixOS
113 stars 21 forks source link

Model weight initialization #5

Open gbtb opened 1 year ago

gbtb commented 1 year ago

Let's track here all the stuff that models are downloading by themselves. It's mostly model's weights. I don't know whether we should to pre-download it ourselves, but I certainly want to avoid possible duplicate downloads and place them all in a single folder

webui

downloads weights lazily, when the feature is first used

Face restoration:
Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth" to /NVME/Projects/nix-stable-diffusion/stable-diffusion-webui/models/GFPGAN/detection_Resnet50_Final.pth
Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.2.2/parsing_parsenet.pth" to /NVME/Projects/nix-stable-diffusion/stable-diffusion-webui/models/GFPGAN/parsing_parsenet.pth
Downloading: "https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth" to /NVME/Projects/nix-stable-diffusion/stable-diffusion-webui/models/GFPGAN/GFPGANv1.4.pth

Extras:
Downloading: "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth" to /NVME/Projects/nix-stable-diffusion/stable-diffusion-webui/models/Codeformer/codeformer-v0.1.0.pth
Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth" to /NVME/Projects/nix-stable-diffusion/stable-diffusion-webui/models/facelib/weights/facelib/detection_Resnet50_Final.pth
Downloading: "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth" to /NVME/Projects/nix-stable-diffusion/stable-diffusion-webui/models/facelib/weights/facelib/parsing_parsenet.pth
Downloading: "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth" to /NVME/Projects/nix-stable-diffusion/stable-diffusion-webui/models/ESRGAN/ESRGAN_4x.pth

InvokeAI

TODO: run preload_models.py again

SD

sd checkpoints are currently downloaded manually.
Personally I grabbed them from torrent because I didn't want to register on whatever sketchy site they used for hosting it. Is there a fetchFromMagnet in nixpkgs?

max-privatevoid commented 1 year ago

There is a draft PR for fetchFromBittorrent https://github.com/NixOS/nixpkgs/pull/212930