ComfyUI Node

GeneratorT2I

The masked-diffusion sampler that actually draws the picture

By L-Hugh·Created 10 months ago·Updated 10 months ago· 2
GeneratorT2I
  • model
  • image_tokens
  • text_tokens
  • vq_tokens
timesteps64
cfg_scale4.00
temperature1.00
use_cachefalse
cache_ratio0.90
warmup_ratio0.30
refresh_interval5

Generator_T2I is the heart of this pack - the sampler that takes text tokens and a blank token grid and fills in the image, one progressively-unmasking pass at a time. If you've used a KSampler, you know the shape of the job. But the math underneath is a different animal, and it's the reason the CFG numbers here look wrong to a Stable Diffusion veteran.

Stable Diffusion denoises a continuous latent by adding and subtracting noise. Lumina-DiMOO comes from the LLaDA family of masked diffusion language models: the image starts as a sequence of mask placeholders, and each step the model predicts a token for every masked position, keeps the ones it's confident about, and re-masks the uncertain ones. After timesteps rounds, the sequence is fully filled in. That's the "masked LLM draws a picture" trick - it's literally generating discrete image tokens the way a masked language model fills in a blanked sentence, scaled up to a 64×64 token grid.

The knobs that matter

  • timesteps (INT, default 64) - how many unmasking rounds. More steps = more chances to revise, at the cost of speed. Each step is a forward pass of the model (two, if CFG is on). The default is the sweet spot.
  • cfg_scale (FLOAT, default 4.0) - classifier-free guidance, computed in logit space rather than latent space. That's why the default is 4 instead of 7-ish: masked diffusion doesn't need the high values that continuous diffusion does. Too high, and you get the same burned, oversaturated mess you'd expect.
  • temperature (FLOAT, default 1.0) - sampling randomness for both token selection and the remasking confidence. Lower = more deterministic.

Then there's the optional speed block. use_cache (BOOLEAN, default false) reuses the model's KV cache across steps so it only recomputes a fraction of positions each round, and three knobs control how aggressive that is: cache_ratio (0.9 default = only ~10% recomputed per refresh), warmup_ratio (0.3 = first 30% of steps run full), and refresh_interval (5 = full recompute every 5 steps). The shipped text-to-image example enables caching, and you probably want to too - masked diffusion with CFG is two forward passes per step, and the cache is the difference between patient and painful.

Inputs:

  • model (LUMINA_MODEL) - from LoadModel.
  • image_tokens (LUMINA_IMAGETOKENS_T2I) - from ImageTokens_T2I (sets resolution) or ImageTokens_Inpainting.
  • text_tokens (LUMINA_TEXTTOKENS) - from PromptBuilder, which also handles inpainting/outpainting tasks.

Output:

  • vq_tokens (VQ_TOKENS) → VQDecode, which turns the finished token grid back into an image. The resolution you set in ImageTokens_T2I travels through here so the decode knows the canvas size.

The honest picture

This is a big, slow, early-adopter stack. The model is roughly 16 GB of weights in bf16, loaded with device_map="auto" - it'll offload to CPU and crawl if you're short on VRAM. Community reception when Lumina-DiMOO launched in late 2025 was skeptical, and the quality isn't going to dethrone a fine-tuned SDXL for most prompts. You're here for the mechanism. Where people do get burned on the generator itself: cranking cfg_scale way up because they're used to SD numbers, or expecting timesteps in the hundreds to fix weak results. The defaults are sane. Change resolution before you change those.

Install the pack via ComfyUI Manager (search ComfyUI-Lumina-DiMOO) or git clone the repo into custom_nodes, run pip install -r requirements.txt, and grab the ~17 GB model snapshot - pinned old dependencies and all. Start from the shipped t2i example workflow.

CategoryLumina-DiMOO

Inputs (10)

NameTypeDefaultDescription
modelLUMINA_MODEL
image_tokensLUMINA_IMAGETOKENS_T2I
text_tokensLUMINA_TEXTTOKENS
timestepsINT64
cfg_scaleFLOAT4.00
temperatureFLOAT1.00
use_cacheoptBOOLEANfalse
cache_ratiooptFLOAT0.90
warmup_ratiooptFLOAT0.30
refresh_intervaloptINT5

Outputs (1)

NameTypeDescription
vq_tokensVQ_TOKENS