this post was submitted on 07 Jul 2023
14 points (100.0% liked)

Stable Diffusion

4316 readers
16 users here now

Discuss matters related to our favourite AI Art generation technology

Also see

Other communities

founded 1 year ago
MODERATORS
 

Hi guys,

I used the Docker install from here. It was easy to get Automatic1111's web interface up and running, but I'm trying to add new models and I can't figure out how to do it.

I've created a /data/StableDiffusion folder (which didn't exist), and added model files from /data/models, with no effect. I've added them to /data/models/stable-diffusion (which already exists), with no effect. Is there another location where the files are stored? Do I need to do something else to get them to work?

ETA: Discovered I was using the wrong file type (.pth) instead of the correct one (.ckpt). When I tried it with that file type it works perfectly. Thank you everyone for your quick responses and help! Y'all were way faster and more helpful than Reddit!

top 25 comments
sorted by: hot top controversial new old
[–] webuge@lemmy.dbzer0.com 2 points 1 year ago (1 children)

It seems like you are missing a volume mapping from your PC to your Docker. The way it works is that you would put the inside the folder on your PC and it would automatically appear in docker. Could you provide the command you are using? Or if you are using docker-compose the docker-compose.yml?

[–] Rangelus 1 points 1 year ago (1 children)

I used the command to install DS found on the git page

docker compose --profile download up --buil

And then to run Automatic1111 I used the following command

docker compose --profile auto up --build

[–] webuge@lemmy.dbzer0.com 3 points 1 year ago (2 children)

You should put your models inside the folder model/StableDiffusion that is in your host machine.

[–] webuge@lemmy.dbzer0.com 2 points 1 year ago* (last edited 1 year ago) (1 children)

Actually I tried running it, the correct folder would be. [PATH_TO_WHERE_YOU_GIT_CLONE]/stable-diffusion-webui-docker/data/models/Stable-diffusion

[–] Rangelus 2 points 1 year ago (2 children)

So I had a sudden thought, went back and tried a different model file that is a .ckpt file rather than the .pth files I was testing with. This worked, so obviously it was a simple matter of the wrong file type. Now I feel foolish!

Out of curiosity, what is the .pth file type used for?

[–] webuge@lemmy.dbzer0.com 1 points 1 year ago (1 children)

So far I only have seen .pth in upscalers. Inside the folders ERSGAN and RealERSGAN for example. And yes models are .chkpt or .safetensors

[–] Rangelus 1 points 1 year ago

I see. Well thanks for your help anyway mate 🙂

[–] gharmonica@lemmy.world 1 points 1 year ago (1 children)

Never install .ckpt checkpoints (unless you're 1000% sure of the source. Always use safetensors files instead.

[–] Rangelus 1 points 1 year ago

Hmm, that's a good point. I've just looked up the difference. Thanks

[–] Rangelus 1 points 1 year ago

I've tried that. There is already a folder at /data/models/Stable-diffusion that has two .ckpt files that match the options that are available in the web ui. I've tried pasting the other .pth files that are in other folders within /data/models but they do not appear as options in the ui.

[–] Dax87@forum.stellarcastle.net 2 points 1 year ago* (last edited 1 year ago) (1 children)

Just to be thorough, does your docker run command / docker-compose have a volume field or flag to link your folder from your host to the container? Or are you making these folders from within the container?

[–] Rangelus 1 points 1 year ago (1 children)

Forgive me for not knowing the details here, I've never used Docker before so I'm just following the guide.

I first created a folder, then I cloned the git repo to it. Finally, from the command prompt, I ran the install command from within the folder.

[docker compose --profile download up --build]

[–] Dax87@forum.stellarcastle.net 3 points 1 year ago (2 children)

Show me your docker-compose.yml contents. Won't be able to reply until later in the morning. But I should be able to help you get set up.

[–] Rangelus 1 points 1 year ago

I really appreciate it. You can find here.

[–] Rangelus 1 points 1 year ago (1 children)

So it turns out I was using the incorrect file type. I had chosen a set of model files that came with the install that were .pth files. These didn't work, but when I tried it with .ckpt files it works as expected. Big sigh. Thanks for the help anyway mate!

[–] Dax87@forum.stellarcastle.net 2 points 1 year ago

Nice! Glad you got it figured out

[–] luthis 1 points 1 year ago (1 children)

I've never used the docker version, it's been easier to use the installer zip.

Have you tried refreshing the list of models?

[–] Rangelus 1 points 1 year ago (1 children)

I did after each attempt.

Using the installer zip, can you just drop model files into the correct folder and have them work? If so, I may have to just use that version instead.

[–] luthis 1 points 1 year ago (1 children)

Yes, after it's installed you can just shove the safetensors etc into the folder and they show in the list after refresh.

[–] Rangelus 2 points 1 year ago (1 children)

Thanks. The Docker version is supposed to be easier, as it handles updates to all dependencies automatically. But, if I can't add new models there's not much incentive to keep using it.

[–] luthis 1 points 1 year ago

I'm sure there is a way you can, but I have no idea, I don't really understand docker. I never use it

[–] vacuumpizzas@t.bobamilktea.xyz 1 points 1 year ago (2 children)

Searching through the issues, this seemed relevant:

there are a couple of complicating factors.. One is that all the different modules (stable diffusion, esrgan, realesrgan, clip, blip, codeformer, etc..) have their own functions to download models and their own preferred places to save them, and currently not all of them are configurable. Would be nice if they could be changed so they look in models// so just the models dir could be mapped to the host file system and kept outside the image.

Source link

So it reads like it’s going to be dependent on the module and all of the module’s specific nuances.

[–] luthis 2 points 1 year ago (1 children)

module or model? Because for models it's blindingly easy.

[–] Rangelus 1 points 1 year ago

I'm trying to add different models, not modules.

[–] Rangelus 1 points 1 year ago

Arg, I didn't spot that. That's frustrating. Thanks

load more comments
view more: next ›