SD 3.5: one file and a new empty latent

<!-- lesson: sd35 -->

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 example sd3.5_medium_incl_clips_t5xxlfp8scaled.safetensors.
  • 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.

  1. 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.

  2. Which files your family needs (reading)

    • the checkpoint: sd3.5_large_fp8_scaled.safetensors in 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.safetensors and 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.

  3. Load the checkpoint

    Add a Load Checkpoint node and choose the SD 3.5 file in ckpt_name.

  4. Add the prompt and the negative

    Add two CLIP Text Encode (Prompt) nodes and connect the CLIP output of Load Checkpoint to the clip input of each. In the text field 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.

  5. Add the empty latent of SD3

    Add a EmptySD3LatentImage node and set width and height to 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.

  6. Add the sampler

    Add a KSampler node and connect:

    • to model, the MODEL output of Load Checkpoint;
    • to positive and negative, the two text nodes;
    • to latent_image, the output of EmptySD3LatentImage.
  7. 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 cfg 1.

  8. Turn the result into a picture

    Add a VAE Decode node. Connect the output of KSampler to its samples input and the VAE output of Load Checkpoint to its vae input.

  9. Save the picture

    Add a Save Image node and connect the output of VAE Decode to its images input.

    Without it ComfyUI works the picture out and puts it nowhere.

  10. 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.

  1. 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: cfg too 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_name of Load Checkpoint holds an SD 3.5 checkpoint that holds its text encoders; such a file lies in models/checkpoints, for example sd3.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.
    • CLIP of Load Checkpoint into clip of CLIP Text Encode (Prompt) (prompt) (a Load LoRA or CLIP Set Last Layer in between is accepted).
    • CLIP of Load Checkpoint into clip of CLIP Text Encode (Prompt) (negative prompt) (a Load LoRA or CLIP Set Last Layer in between is accepted).
    • text of CLIP Text Encode (Prompt) (prompt) holds at least 20 characters.
  • Step 5, Add the empty latent of SD3:
    • a EmptySD3LatentImage node.
    • width of EmptySD3LatentImage is from 512 to 1536; Do this for me sets 1024. Why: SD 3.5 was trained near one megapixel.
    • height of 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.
    • MODEL of Load Checkpoint into model of KSampler (a Load LoRA or LoraLoaderModelOnly or ModelSamplingSD3 in between is accepted).
    • CONDITIONING of CLIP Text Encode (Prompt) (prompt) into positive of KSampler.
    • CONDITIONING of CLIP Text Encode (Prompt) (negative prompt) into negative of KSampler.
    • LATENT of EmptySD3LatentImage into latent_image of KSampler.
  • Step 7, Set the sampler:
    • steps of KSampler is from 20 to 40; Do this for me sets 20. Why: the SD 3.5 template uses 20 steps.
    • cfg of 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_name of KSampler is euler.
    • scheduler of KSampler is sgm_uniform.
  • Step 8, Turn the result into a picture:
    • a VAE Decode node.
    • LATENT of KSampler into samples of VAE Decode.
    • VAE of Load Checkpoint into vae of VAE Decode.
  • Step 9, Save the picture:
    • a Save Image or Preview Image node.
    • IMAGE of VAE Decode into images of Save Image or Preview Image.

See also

This page is imported from the application repository's wiki (docs/wiki/lessons/SD35.md, revision b8e3f71). The same guide is built into the app: Help ▸ User guide.

To refresh it, run npm run import and then npm run build in the website folder.