Nodes/ComfyUI-DiffiT/DiffiT Official Image
ComfyUI Node

DiffiT Official Image

No prompts here, just 1,000 ImageNet classes and a patience requirement

By Apache0ne·Created 6 months ago·Updated 6 months ago· 0
DiffiT Official Image
    • image
    checkpoint_name
    download_if_missingtrue
    device
    class_id207
    batch_size1
    seed12345
    steps250
    cfg_scale4.40
    cfg_condtrue
    use_ddimfalse
    scale_pow4.0
    clip_denoisedfalse
    vae_variant

    The name tells you most of what you need: this is the one node in the Apache0ne/ComfyUI-DiffiT pack, and it's the official NVIDIA DiffiT checkpoint - a class-conditional ImageNet model, not a text-to-image model. You don't type "golden retriever." You type 207. That's the whole interaction model here, and it's the reason this node feels like a time machine back to 2023 research demos more than a daily-driver generator.

    Which is fine. DiffiT ("Diffusion Vision Transformers," NVIDIA, 2023) is a genuinely interesting piece of history: a pure vision-transformer diffusion model trained on ImageNet at 256 and 512, sampled with the old OpenAI-style DDPM loop, then decoded through a Stable Diffusion VAE. It's one of the clearest ways in ComfyUI to see what a DiT does without any of the modern flow-matching machinery layered on top. If you came here from the KB's sampler essays - where every 2026 model is either guidance-distilled or flow-matched - this is the museum wing. Slow, but instructive.

    How it works

    The node loads the official checkpoint (diffit_256.safetensors or diffit_512.safetensors), builds latent noise from your seed, runs the DDPM or DDIM sampler from the vendored upstream repo, and hands the result to a diffusers AutoencoderKL (sd-vae-ft-ema or sd-vae-ft-mse) to decode into pixels. One IMAGE comes out the other end.

    Two mechanism details are worth knowing because they map directly to knobs you'll touch. First, there's no text encoder - conditioning is a single class integer, and classifier-free guidance works by pairing it with a null class (the 1000th class, so "class 1000" is the unconditional half). Second, the CFG is not a flat constant. On the 256 model the guidance scale follows a power-cosine schedule that ramps over the denoising trajectory - scale_pow controls the ramp's shape - while the 512 model uses constant linear CFG. That's why cfg_scale defaults differ (4.4 for 256, 1.49 for 512) and why blindly copying SDXL's CFG 7 here will just scorch the image.

    The pack is also fp32 only - the author ripped out fp16 - and defaults to 250 steps. Combined with CFG doubling every forward pass, this thing is slow. Budget accordingly.

    The inputs that matter

    • checkpoint_name - 256 or 512; image size is inferred from the checkpoint, so you don't set resolution separately.
    • class_id - 0–999, default 207 (golden retriever). This is your prompt.
    • steps - 250 default. Drop it if you're on a 512 checkpoint and want to live.
    • cfg_scale / scale_pow - CFG strength and the 256-model's guidance ramp. Defaults are the paper's.
    • vae_variant - ema or mse; the SD VAE used to decode.
    • download_if_missing - on by default, which auto-fetches the checkpoint from HF.

    Output: a single IMAGE, ready for Save Image, Preview, or anything else that accepts an image.

    One warning the README literally screams at you: "Class IDs ITS A LIE dont use 0." The numbering is zero-based, but the author's own class table is off by one (he lists 1 = tench, 2 = goldfish, 3 = great white shark) and he doesn't trust class 0. Practical advice: stick with 207 for your first render, then wander. If a class comes out wrong, try its neighbor.

    Install

    Easiest path is ComfyUI Manager - search "ComfyUI-DiffiT" and install, then restart. Manual install works the same as any custom node:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Apache0ne/ComfyUI-DiffiT
    # restart ComfyUI
    

    Dependencies come from the pack's requirements.txt: diffusers, huggingface_hub, and timm. The checkpoints download from nvidia/DiffiT on Hugging Face into models/diffusion_models (or Models/DiffusionModels under Stability Matrix).

    Where people get burned

    The obvious one is speed: 250 fp32 steps with CFG on a ~1B-parameter ViT is not a quick doodle. Use the 256 model for iteration. If you ever hit a "non-finite latent" error, your settings pushed the sampler off the rails - reset cfg_scale/scale_pow to defaults and lower steps. A failed download usually means network or HF auth, and the error message says exactly that. And note the license: upstream DiffiT code is NVIDIA NC and the weights are CC-BY-NC-SA - fine for tinkering, not for shipping commercially.

    CategoryNVIDIA/DiffiT

    Inputs (13)

    NameTypeDefaultDescription
    checkpoint_nameCOMBO2 options: diffit_256.safetensors, diffit_512.safetensors
    download_if_missingBOOLEANtrue
    deviceCOMBO3 options: auto, cuda, cpu
    class_idINT2070–999
    batch_sizeINT11–64
    seedINT123450–9223372036854776000
    stepsINT2502–1000
    cfg_scaleFLOAT4.400–32
    cfg_condBOOLEANtrue
    use_ddimBOOLEANfalse
    scale_powFLOAT4.00–16
    clip_denoisedBOOLEANfalse
    vae_variantCOMBO2 options: ema, mse

    Outputs (1)

    NameTypeDescription
    imageIMAGE