Load Switti Checkpoint
The brain, and the toggles you can ignore
- SWITTI_CORE
Switti is Yandex Research's take on text-to-image, and it's not a diffusion model at all. It's a scale-wise autoregressive transformer: it builds an image by predicting token maps resolution-by-resolution, a few thousand tokens at a time, instead of denoising a latent through a hundred steps. Yandex's pitch at launch was speed - up to roughly 7x faster than SDXL - and the community reaction was "speed is incredible, quality a bit rough." This node loads the core transformer that does that predicting. Think of it as the model's brain.
The first thing to know, because it bites everyone who comes from SD: the output is SWITTI_CORE, not a ComfyUI MODEL. You cannot wire this into a KSampler. The three loaders in this pack output custom types (SWITTI_CORE, SWITTI_VAE, SWITTI_TEXT) that only feed the pack's own Build Switti Pipeline node, which bundles them into one pipeline object the sampler actually consumes. If you reach for this expecting a checkpoint loader that drops into a normal sampling graph, you'll be confused for a while.
Mechanically it's straightforward. It reads a .safetensors from ComfyUI/models/diffusion_models (or an absolute path via checkpoint_path), builds a SwittiHF transformer, and loads the weights. Two things make it cleverer than a dumb loader:
infer_depth(default on) counts the transformer blocks in the state dict (blocks.0,blocks.1, …) and sets the model depth from that, so you don't have to know the architecture of whatever checkpoint you downloaded.depthis the manual override - default 30, which suits the released models.strict_load(default on) means every key in the state dict must match the architecture. If you've got a checkpoint with renamed or extra keys, flip it off and it'll load with missing/unexpected keys logged to the console instead of hard-failing.
The inputs you'll actually touch: checkpoint_name (dropdown from models/diffusion_models) and resolution - 512 or 1024, and it must match the VAE you load later. Mix a 512 core with a 1024 VAE and Build Switti Pipeline refuses with "Switti core/VAE resolution mismatch." The rest - rope, rope_theta, rope_size, use_swiglu_ffn, use_crop_cond, use_ar - are architecture toggles whose defaults match the released checkpoints. Leave them alone. (use_ar controls the autoregressive KV-caching mode; the sampler enables it internally regardless.)
Install the pack with ComfyUI Manager (search "ComfyUI-Switti") or:
cd ComfyUI/custom_nodes
git clone https://github.com/RyukoMatoiFan/ComfyUI-Switti
…then restart ComfyUI. The pack vendors the Switti source in its switti/ folder, and the pinned deps there (transformers==4.45.2, diffusers==0.31.0, huggingface_hub==0.26.2, torchvision==0.19.1) are late-2024-era. If your ComfyUI environment runs newer versions and you get import errors, this pin list is the usual culprit.
Models: grab yresearch/Switti (512) or yresearch/Switti-1024 from HuggingFace (there are also -AR variants) and drop the .safetensors into ComfyUI/models/diffusion_models. This is a niche single-commit port, so don't expect releases or an issue tracker with answers - the README and the node source are your docs.
Where people get burned: strict_load failing on a mismatched checkpoint (just toggle it), and resolution mismatches surfacing two nodes downstream instead of here.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| checkpoint_name | COMBO | 0 options: | |
| resolution | INT | 512512–1024 | — |
| use_ar | BOOLEAN | false | — |
| rope | BOOLEAN | true | — |
| rope_theta | FLOAT | 100001–100000 | — |
| rope_size | INT | 12832–512 | — |
| use_swiglu_ffn | BOOLEAN | true | — |
| use_crop_cond | BOOLEAN | true | — |
| depth | INT | 301–64 | — |
| infer_depth | BOOLEAN | true | — |
| strict_load | BOOLEAN | true | — |
| checkpoint_pathopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SWITTI_CORE | SWITTI_CORE | — |