SMD-SD3.5-Medium

4-step SMD for text-to-image generation. Six full transformer variants share the upstream text encoders and VAE.

Training code · SMD collection

Example

All six variants use the same prompt, seed, resolution and four-step sampling settings. The grid shows their outputs with variant labels; original images and generation settings are linked below.

Six variants: self, clipscore, geneval, ocr, pickscore and multi

Prompt: Two red apples on a green wooden crate labeled "SMD". A rustic kitchen, soft morning sunlight, still life photography.

Seed: 1234. Size: 1024 × 1024. Steps: 4.

Variant Original image Case settings Generation receipt
self Image Case Receipt
clipscore Image Case Receipt
geneval Image Case Receipt
ocr Image Case Receipt
pickscore Image Case Receipt
multi Image Case Receipt

Models

Variant Weights Steps Size
self Full transformer 4 4.94 GB
clipscore Full transformer 4 4.94 GB
geneval Full transformer 4 4.94 GB
ocr Full transformer 4 4.94 GB
pickscore Full transformer 4 4.94 GB
multi Full transformer 4 4.94 GB

self uses the base teacher; clipscore, geneval, ocr, and pickscore identify specialized teachers; multi combines teachers. These are variant names, not benchmark results. Select one with --variant. The example above compares all six variants.

Run

Base: stabilityai/stable-diffusion-3.5-medium.

Use Linux, Python 3.12 and an NVIDIA GPU with CUDA support. The included inference code does not import the SMD training repository.

python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install huggingface-hub
# Sign in to Hugging Face.
hf auth login
hf download zjwfufu/SMD-SD3.5-Medium --local-dir SMD-SD3.5-Medium --include "*.py" "requirements.txt" "README.md" "LICENSE*" "clipscore/*" "clipscore.safetensors" --exclude "*/transformer/*.safetensors"
cd SMD-SD3.5-Medium
python -m pip install -r requirements.txt
python infer.py --variant clipscore --output outputs

The example was run on an A100 80 GB. Model CPU offload reduces GPU memory usage; enough host RAM is still needed to load the upstream components. Use --prompt, --seed and --output to generate another case. --base accepts a local upstream snapshot.

The command downloads only the clipscore variant (4.94 GB of weights). To choose another, replace both clipscore/* and clipscore.safetensors in the download command and clipscore in --variant. Omit --include and keep --exclude "*/transformer/*.safetensors" to download all six variants (about 29.64 GB of weights) plus the bundled CLIPScore teacher (about 75 MB). Loading uses the full student transformer without a LoRA merge. The runner prefers <variant>.safetensors at the repository root and strictly loads it with the original <variant>/transformer/config.json. These weights are byte-identical to the retained legacy <variant>/transformer/diffusion_pytorch_model.safetensors files, which remain supported as a fallback. Download the root weights with the variant configuration; excluding the nested weight copies avoids downloading identical weights twice.

The first run downloads the upstream base components to the Hugging Face cache. Plan disk space for those components as well as the released weights; subsequent runs reuse the cache.

Sampling

The released sampler uses raw final-segment scale 0.5. The raw grid is built before the model-specific time shift. The included runner follows <variant>/sampling.json; changing only an upstream pipeline's step count does not reproduce the student.

External classifier-free guidance is disabled for the students. Any embedded guidance remains specified in <variant>/sampling.json.

Specialist teachers

The reward specialist teachers used for distillation are available separately from the four-step students above:

Teacher Source
CLIPScore Bundled LoRA trained by the SMD authors with DiffusionNFT
GenEval jieliu/SD3.5M-FlowGRPO-GenEval
OCR jieliu/SD3.5M-FlowGRPO-Text
PickScore jieliu/SD3.5M-FlowGRPO-PickScore

The three external adapters were trained with Flow-GRPO. Their upstream revisions and all adapter checksums are recorded in teachers/manifest.json. The bundled teacher is in teachers/clipscore/; the student remains in clipscore/transformer/.

Teacher download instructions install only the requested LoRAs into $SMD_MODEL_ROOT/sd35_teachers/. Teacher adapters do not use the four-step student sampler. Adapter-specific licensing is noted in that guide.

License and attribution

Base components retain the terms described in the stabilityai/stable-diffusion-3.5-medium model card. Original code notices and bundled licenses are retained. Use of the released weights remains subject to the applicable base-model terms.

Downloads last month
68
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for zjwfufu/SMD-SD3.5-Medium

Finetuned
(81)
this model

Collection including zjwfufu/SMD-SD3.5-Medium