Diffusers 0.31.0: Stable Diffusion 3.5 Large, CogView3 und Quantisierung
Diffusers 0.31.0 unterstützt Stable Diffusion 3.5 Large und das neue Text-zu-Bild-Modell CogView3-plus und bringt zudem Quantisierung und neue Trainingsskripte.
v0.31.0: Stable Diffusion 3.5 Large, CogView3, Quantization, Training Scripts, and more
Stable Diffusion 3.5 Large
Stability AI’s latest text-to-image generation model is Stable Diffusion 3.5 Large. SD3.5 Large is the next iteration of Stable Diffusion 3. It comes with two checkpoints (both of which have 8B params):
- A regular one
- A timestep-distilled one enabling few-step inference
Make sure to fill up the form by going to the model page, and then run huggingface-cli login before running the code below.
# make sure to update diffusers
# pip install -U diffusers
import torch
from diffusers import StableDiffusion3Pipeline
pipe = StableDiffusion3Pipeline.from_pretrained(
"stabilityai/stable-diffusion-3.5-large", torch_dtype=torch.bfloat16
).to("cuda")
image = pipe(
prompt="a photo of a cat holding a sign that says hello world",
negative_prompt="",
num_inference_steps=40,
height=1024,
width=1024,
guidance_scale=4.5,
).images[0]
image.save("sd3_hello_world.png")
Follow the documentation to know more.
Cogview3-plus
We added a new text-to-image model, Cogview3-plus, from the THUDM team! The model is DiT-based and supports image generation from 512 to 2048px. Thanks to @zRzRzRzRzRzRzR for contributing it!