Views
No views yet


1├── text_encoders/
2│ ├── README.md
3│ ├── clip_g.safetensors
4│ ├── clip_l.safetensors
5│ ├── t5xxl_fp16.safetensors
6│ └── t5xxl_fp8_e4m3fn.safetensors
7│
8├── README.md
9├── LICENSE
10├── sd3_large.safetensors
11├── SD3.5L_example_workflow.json
12└── sd3_large_demo.png
13
14** File structure below is for diffusers integration**
15├── scheduler/
16├── text_encoder/
17├── text_encoder_2/
18├── text_encoder_3/
19├── tokenizer/
20├── tokenizer_2/
21├── tokenizer_3/
22├── transformer/
23├── vae/
24└── model_index.jsonpip install -U diffusers1import torch
2from diffusers import StableDiffusion3Pipeline
3
4pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-large", torch_dtype=torch.bfloat16)
5pipe = pipe.to("cuda")
6
7image = pipe(
8 "A capybara holding a sign that reads Hello World",
9 num_inference_steps=28,
10 guidance_scale=3.5,
11).images[0]
12image.save("capybara.png")pip install bitsandbytes1from diffusers import BitsAndBytesConfig, SD3Transformer2DModel
2from diffusers import StableDiffusion3Pipeline
3import torch
4
5model_id = "stabilityai/stable-diffusion-3.5-large"
6
7nf4_config = BitsAndBytesConfig(
8 load_in_4bit=True,
9 bnb_4bit_quant_type="nf4",
10 bnb_4bit_compute_dtype=torch.bfloat16
11)
12model_nf4 = SD3Transformer2DModel.from_pretrained(
13 model_id,
14 subfolder="transformer",
15 quantization_config=nf4_config,
16 torch_dtype=torch.bfloat16
17)
18
19pipeline = StableDiffusion3Pipeline.from_pretrained(
20 model_id,
21 transformer=model_nf4,
22 torch_dtype=torch.bfloat16
23)
24pipeline.enable_model_cpu_offload()
25
26prompt = "A whimsical and creative image depicting a hybrid creature that is a mix of a waffle and a hippopotamus, basking in a river of melted butter amidst a breakfast-themed landscape. It features the distinctive, bulky body shape of a hippo. However, instead of the usual grey skin, the creature's body resembles a golden-brown, crispy waffle fresh off the griddle. The skin is textured with the familiar grid pattern of a waffle, each square filled with a glistening sheen of syrup. The environment combines the natural habitat of a hippo with elements of a breakfast table setting, a river of warm, melted butter, with oversized utensils or plates peeking out from the lush, pancake-like foliage in the background, a towering pepper mill standing in for a tree. As the sun rises in this fantastical world, it casts a warm, buttery glow over the scene. The creature, content in its butter river, lets out a yawn. Nearby, a flock of birds take flight"
27
28image = pipeline(
29 prompt=prompt,
30 num_inference_steps=28,
31 guidance_scale=4.5,
32 max_sequence_length=512,
33).images[0]
34image.save("whimsical.png")