How do I load the models once downloaded?

#21
by Softology - opened

I have downloaded all the files from
https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers/tree/main
into a local models directory under my Python script.
How do I use them? ie what change needs to be made to
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16)
to use the local versions.
Thanks.

I download the models locally using

git clone https://[username]:[token]@huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers

Change the Repo id to the path to the top level directory from the git clone

pipe = StableDiffusion3Pipeline.from_pretrained("/my/path/to/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16)

Thank you. That was a simple fix. It is working now.

Softology changed discussion status to closed

Change the Repo id to the path to the top level directory from the git clone

pipe = StableDiffusion3Pipeline.from_pretrained("/my/path/to/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16)

OSError: Can't load tokenizer for 'models/stable-diffusion-3-medium-diffusers'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'models/stable-diffusion-3-medium-diffusers' is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.

Don't use 2 part paths , it thinks you're using a Repo Id.
Try './models/stable-diffusion-3-medium-diffusers' or the full path.

Sign up or log in to comment