stable-diffusion.cpp/docs/models/minit2i.md

3.3 KiB

MiniT2I

MiniT2I uses a MiniT2I diffusion transformer and google/flan-t5-large as the text encoder.

Model files

Component Weights and downloads CLI option Requirement
MiniT2I diffusion model Safetensors (diffusion_pytorch_model.safetensors) --diffusion-model Required
flan-t5-large text encoder Safetensors (model.safetensors) --t5xxl Required

Usage

Web UI

Follow the Web UI guide to start the server, then select the recipe matching your weights. Fill the component slots below and click Load models. Use the files and compatibility requirements in Model files.

Recipe Component slots
MiniT2I (minit2i) diffusion_model, t5xxl

Slot IDs correspond to CLI component options: diffusion_model uses --diffusion-model, llm uses --llm, and model uses -m / --model. Select optional components when required by your checkpoint or task.

DGL

Example Description
CUDA Text-to-image generation on CUDA.
Metal Run with --threads 8.

Run a script

Edit paths, prompts and settings in the script's var block, then run from the build directory. Paths inside the script resolve from the working directory.

Windows (PowerShell)

.\bin\Release\sd-cli.exe -M dgl --script ..\docs\dgl\minit2i\minit2i-cuda-txt2img.dgl

Linux/macOS

./bin/sd-cli -M dgl --script ../docs/dgl/minit2i/minit2i-cuda-txt2img.dgl

Choose another script from the table to run a different task. Add --check to validate syntax and types without loading weights. See the shared run instructions for build paths and the server's file-access rules.

Legacy CLI

CLI examples use the shared path and shell conventions.

CUDA

Windows (PowerShell)

.\bin\Release\sd-cli.exe `
  --diffusion-model ..\models\diffusion_models\minit2i\diffusion_pytorch_model.safetensors `
  --t5xxl ..\models\text_encoders\flan-t5-large\model.safetensors `
  --prompt "a cat" `
  --steps 100 `
  --cfg-scale 6 `
  --sampling-method euler `
  --width 512 `
  --height 512 `
  --seed 42 `
  --output minit2i_cuda.png

Linux/macOS

./bin/sd-cli \
  --diffusion-model ../models/diffusion_models/minit2i/diffusion_pytorch_model.safetensors \
  --t5xxl ../models/text_encoders/flan-t5-large/model.safetensors \
  --prompt "a cat" \
  --steps 100 \
  --cfg-scale 6 \
  --sampling-method euler \
  --width 512 \
  --height 512 \
  --seed 42 \
  --output minit2i_cuda.png

macOS with Metal

macOS (Metal)

./bin/sd-cli \
  --diffusion-model ../models/diffusion_models/minit2i/diffusion_pytorch_model.safetensors \
  --t5xxl ../models/text_encoders/flan-t5-large/model.safetensors \
  --prompt "a cat" \
  --steps 100 \
  --cfg-scale 6 \
  --sampling-method euler \
  --width 512 \
  --height 512 \
  --rng cpu \
  --threads 8 \
  --backend metal \
  --seed 42 \
  --output minit2i_metal.png