SD 3.5: one file and a new empty latent
Lesson "sd35", in the group Pictures: models of the lesson list. Steps: 11.
What you will be able to do
You build an SD 3.5 graph from one checkpoint with the empty latent and the settings of this family.
What you need
- It goes on from SDXL done properly. The card says so; it is a hint, not a lock.
- Model files the lesson checks:
- an SD 3.5 checkpoint that holds its text encoders:
models/checkpoints, for examplesd3.5_medium_incl_clips_t5xxlfp8scaled.safetensors.
- an SD 3.5 checkpoint that holds its text encoders:
- Nodes: Load Checkpoint, CLIP Text Encode (Prompt), EmptySD3LatentImage, KSampler, VAE Decode, Save Image / Preview Image.
- The app downloads and installs nothing. The step texts below say which files and folders, and which ComfyUI template names them.
The steps
The words of each step, as the lesson shows them. Node names are in bold.
What SD 3.5 is (reading)
Stable Diffusion 3.5 by Stability AI comes as Large, Large Turbo and Medium. It reads the prompt with three text encoders at once: CLIP-L, CLIP-G and T5-XXL, so it understands long sentences.
ComfyUI's template "SD3.5 Simple" loads it from one checkpoint file that holds the model, the three encoders and the VAE. The graph looks like that of SDXL, with another empty latent and other settings.
Which files your family needs (reading)
- the checkpoint:
sd3.5_large_fp8_scaled.safetensorsin models/checkpoints; it already holds the encoders and the VAE.
If your file holds no text encoders (the model page says so), the three encoders
clip_l.safetensors,clip_g.safetensorsand a t5xxl file load with the node Load CLIP (Triple) from models/text_encoders, and its output takes the place of the checkpoint's CLIP output.If a file is not in the list, your ComfyUI does not have it. The app downloads nothing. Open the template "SD3.5 Simple" in ComfyUI itself: it shows which files are missing and where to put them. Take files only from the model's official page. Then choose "Sync ▸ Sync now" in this app's menu, and the files appear in the lists.
- the checkpoint:
Load the checkpoint
Add a Load Checkpoint node and choose the SD 3.5 file in
ckpt_name.Add the prompt and the negative
Add two CLIP Text Encode (Prompt) nodes and connect the
CLIPoutput of Load Checkpoint to theclipinput of each. In thetextfield of the first, describe the picture in sentences: a glass bottle with a small galaxy inside, on a wooden kitchen table, mountains behind the window.SD 3.5 works with cfg above 1, so the negative is read. ComfyUI's template leaves it empty; write in it only what really gets in the way.
Add the empty latent of SD3
Add a EmptySD3LatentImage node and set
widthandheightto 1024.This empty latent has 16 channels, the form SD 3.5 works in, and it is the node of ComfyUI's template. The usual Empty Latent Image makes 4; a recent ComfyUI fits an empty latent to the model, but keep to the template's node. SD 3.5 is trained at about one megapixel.
Add the sampler
Add a KSampler node and connect:
- to
model, theMODELoutput of Load Checkpoint; - to
positiveandnegative, the two text nodes; - to
latent_image, the output of EmptySD3LatentImage.
- to
Set the sampler
In KSampler set:
steps: 20;cfg: 4;sampler_name:euler;scheduler:sgm_uniform.
These are the numbers of ComfyUI's template. At cfg 7, the habit of SDXL, SD 3.5 burns the colours. Large Turbo is distilled: 4 steps and
cfg1.Turn the result into a picture
Add a VAE Decode node. Connect the output of KSampler to its
samplesinput and theVAEoutput of Load Checkpoint to itsvaeinput.Save the picture
Add a Save Image node and connect the output of VAE Decode to its
imagesinput.Without it ComfyUI works the picture out and puts it nowhere.
The shift of SD3-like models (reading)
SD 3.5 removes noise along a straight path, like Flux, Z-Image and Qwen-Image. Where the steps are spent on that path is set by the shift; for SD 3.5 ComfyUI already applies 3, so no node is needed.
The ModelSamplingSD3 node changes it, between the model and the sampler. ComfyUI's templates of HiDream use it with 6 for Dev and 3 for Full and Fast.
- The graph is ready (reading)
Save the graph with "File ▸ Save workflow for ComfyUI…", open the file in ComfyUI and run it there. This app runs nothing in ComfyUI itself.
If the result is bad:
- an error about the latent in an older ComfyUI: the empty latent is the usual one of 4 channels;
- burnt colours:
cfgtoo high; - an error about the text encoder: the file holds no encoders, see the step on files.
LoRAs and ControlNets must be made for SD 3.5, and for its size: those of Large do not fit Medium.
What the lesson checks
A reading step is done when you press Got it, next. A doing step ticks itself off when the canvas holds:
- Step 3, Load the checkpoint:
- a Load Checkpoint node.
ckpt_nameof Load Checkpoint holds an SD 3.5 checkpoint that holds its text encoders; such a file lies inmodels/checkpoints, for examplesd3.5_medium_incl_clips_t5xxlfp8scaled.safetensors.
- Step 4, Add the prompt and the negative:
- a CLIP Text Encode (Prompt) node.
- a CLIP Text Encode (Prompt) node.
CLIPof Load Checkpoint intoclipof CLIP Text Encode (Prompt) (prompt) (a Load LoRA or CLIP Set Last Layer in between is accepted).CLIPof Load Checkpoint intoclipof CLIP Text Encode (Prompt) (negative prompt) (a Load LoRA or CLIP Set Last Layer in between is accepted).textof CLIP Text Encode (Prompt) (prompt) holds at least 20 characters.
- Step 5, Add the empty latent of SD3:
- a EmptySD3LatentImage node.
widthof EmptySD3LatentImage is from 512 to 1536; Do this for me sets 1024. Why: SD 3.5 was trained near one megapixel.heightof EmptySD3LatentImage is from 512 to 1536; Do this for me sets 1024. Why: SD 3.5 was trained near one megapixel.
- Step 6, Add the sampler:
- a KSampler node.
MODELof Load Checkpoint intomodelof KSampler (a Load LoRA or LoraLoaderModelOnly or ModelSamplingSD3 in between is accepted).CONDITIONINGof CLIP Text Encode (Prompt) (prompt) intopositiveof KSampler.CONDITIONINGof CLIP Text Encode (Prompt) (negative prompt) intonegativeof KSampler.LATENTof EmptySD3LatentImage intolatent_imageof KSampler.
- Step 7, Set the sampler:
stepsof KSampler is from 20 to 40; Do this for me sets 20. Why: the SD 3.5 template uses 20 steps.cfgof KSampler is from 3 to 5.5; Do this for me sets 4. Why: cfg 7, the SDXL habit, burns the colors of SD 3.5; its template uses 4.sampler_nameof KSampler iseuler.schedulerof KSampler issgm_uniform.
- Step 8, Turn the result into a picture:
- a VAE Decode node.
LATENTof KSampler intosamplesof VAE Decode.VAEof Load Checkpoint intovaeof VAE Decode.
- Step 9, Save the picture:
- a Save Image or Preview Image node.
IMAGEof VAE Decode intoimagesof Save Image or Preview Image.