Instructions to use stabilityai/stable-diffusion-3-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusion Single File
How to use stabilityai/stable-diffusion-3-medium with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Inference
- Notebooks
- Google Colab
- Kaggle
Load sd3 from local path
Hello, how can I use "StableDiffusion3Pipeline.from_pretrained" with a local dir such as /home/user/moder/sd3
Generally, in sdxl or other sd models, there are "scheduler","tokenizer","config.json"... in files. But I can't find them in sd3 files. There are only checkpoints and text encoder moderl.
I think because of the security problem, developers didn't pull these files?
If not, please tell me how can I use pipeline without downloading from the hugging face, thanks
from diffusers import StableDiffusion3Pipeline
pipe = StableDiffusion3Pipeline.from_single_file(
"path_to_sd3_medium_incl_clips.safetensors",
torch_dtype=torch.float32,
text_encoder_3=None
)
Because i try to use "diffusers/examples/dreambooth/train_dreambooth_sd3_lora.py" to finetune sd3 (it use StableDiffusion3Pipeline.from_pretrained to load model),StableDiffusion3Pipeline.from_single_file maybe cannot work
from diffusers import StableDiffusion3Pipeline
pipe = StableDiffusion3Pipeline.from_single_file(
"path_to_sd3_medium_incl_clips.safetensors",
torch_dtype=torch.float32,
text_encoder_3=None
)
It doesn't work at all.
pipe = pipeline_class.from_pretrained(model_file_path, **pipeline_config)
where pipeline_class is StableDiffusion3Pipeline
from diffusers.pipelines import StableDiffusion3Pipeline
pipe = StableDiffusion3Pipeline.from_pretrained(model_file_path, **pipeline_config)
pipeis a callable instance objectmodel_file_pathmust exist locally, otherwise it will default to the remote path.**pipeline_configis a dictionary containing key-value pair arguments