Instructions to use stabilityai/stable-diffusion-3-medium-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stabilityai/stable-diffusion-3-medium-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
pipeline参数不足报错,我用的是示例代码
Pipeline <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> expected {'vae', 'unet', 'image_encoder', 'text_encoder', 'feature_extractor', 'tokenizer', 'safety_checker', 'scheduler'}, but only {'vae', 'scheduler', 'tokenizer', 'text_encoder'} were passed.
Did you solve it? I am also getting this error.
Did you solve it? I am also getting this error
Me too
maybe you should generate a token with permission "write",then pass the token parameter,(示例代码应该跑不通的)
by the way,set your own cache_dir if you do not have enough space on disk C,the model is nearly 14G,
import torch
from diffusers import StableDiffusion3Pipeline
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16,cache_dir="<your_directory>",token=<your_token>)
pipe = pipe.to("cuda")
image = pipe(
"A cat holding a sign that says hello world",
negative_prompt="",
num_inference_steps=28,
guidance_scale=7.0,
).images[0]
image
Did you solve it? I am also getting this error.
Have you solved it?I am also getting this error.