⚠️ Disclaimer:
This is not an official model. It is intended for research and experimental purposes only.
Stability AI Community License, not MIT/Apache/GPL. It's a proprietary license with revenue-based restrictions.
I’ve built on top of the SD3.5 model to improve both performance and efficiency. The original base model included several parts that used more resources than necessary. Some of the bias issues also came from DIT, the main image generation backbone.
I’ve made a few key changes — most notably, cutting down the size of TE3 (T5-XXL) by over 99%. It was using way too much power for what it did. I still kept the core features that matter, and while the prompt interpretation might be a little less powerful, it’s not by much, thanks to model projection and distillation tricks.
Personally, I think this version gives great skin tones. But keep in mind it was trained on a small starter dataset with relatively few steps, just enough to find a decent balance.
If you'd like to support future versions or want me to make something similar, feel free to suggest or support me here:
👉
https://buymeacoffee.com/kpsss34
-
pipeline : pipeline_stable_diffusion_3_S.py
-
inference_file : inference.py
2.Keep pipeline files and inference files in the same folder.
1
2import torch
3import time
4from pipeline_stable_diffusion_3_S import StableDiffusion3SPipeline
5
6seed = 43
7generator = torch.manual_seed(seed)
8
9pipe = StableDiffusion3SPipeline.from_pretrained(
10 "kpsss34/Stable-Diffusion-3.5-Small-Preview1",
11 torch_dtype=torch.bfloat16,
12 use_safetensors=True,
13).to("cuda")
14
15filename = f"./img_{seed}_{int(time.time())}.png"
16
17image = pipe(
18 prompt="",
19 negative_prompt="bad hands, bad finger, worst quality, low quality, jpeg artifacts, cartoon, painting, doll, ugly, disfigured, deformed, mutated, extra limbs, extra fingers, missing fingers, long neck, bad anatomy, bad proportions, unrealistic face, cloned face, blurred, watermark, text",
20 num_inference_steps=40,
21 guidance_scale=5.0,
22 width=768,
23 height=768,
24 generator=generator,
25).images[0]
26
27image.save(filename)
28print(f"Saved as {filename} (seed: {seed})")
29