Text-to-Image
Diffusion Single File
English
stable-diffusion

Run this model with HF Jobs

Run stabilityai/stable-diffusion-3-medium on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/stabilityai/stable-diffusion-3-medium. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/stabilityai/stable-diffusion-3-medium on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Load sd3 from local path

#195
by Walnuttt - opened

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)
  • pipe is a callable instance object
  • model_file_path must exist locally, otherwise it will default to the remote path.
  • **pipeline_config is a dictionary containing key-value pair arguments

Sign up or log in to comment