Nodes/ComfyUI-BAGEL/BAGEL Text to Image (Deprecated)
ComfyUI Node

BAGEL Text to Image (Deprecated)

Text to image with a model that reads, not just encodes

By neverbiasu·Created about a year ago·Updated 25 days ago· 188
BAGEL Text to Image (Deprecated)
  • model
  • image
  • thinking
promptA female cosplayer portraying an ethereal fairy or elf, wearing a flowing dress made of delicate fabrics in soft, mystical colors like emerald green and silver. She has pointed ears, a gentle, enchanting expression, and her outfit is adorned with sparkling jewels and intricate patterns. The background is a magical forest with glowing plants, mystical creatures, and a serene atmosphere.
seed0
image_ratio1:1
cfg_text_scale4.0
num_timesteps50
show_thinkingfalse
cfg_interval0.4
timestep_shift3.0
cfg_renorm_min0.0
cfg_renorm_typeglobal
text_temperature0.3

Text-to-image is the marquee feature of BAGEL, and it behaves differently from a normal SD/FLUX-style prompt node. BAGEL is ByteDance's open multimodal model - 7B active parameters in a 14B Mixture-of-Transformer-Experts (MoT) hybrid - released under Apache 2.0. Because the same transformer reads your prompt and generates the image, the node can do what plain CLIP encoding can't: actually understand a long, descriptive sentence instead of boiling it down to a keyword vector. That's the whole pitch, and it's why ByteDance's own benchmarks had BAGEL beating FLUX on GenEval (prompt-following with object counts and layout). Treat the benchmarks with the usual salt, but the "one model, real comprehension" framing is real.

How it works

The mechanism is the interesting part. Your prompt gets tokenized into text the model reads, and then it denoises an image directly in latent space using a FLUX-style VAE - the same vision/generation split ByteDance shipped in the original BAGEL inferencer. So although it smells like a diffusion pipeline, the text conditioning isn't a CLIP or T5 embedding; it's the language model's own hidden state. The node even supports a "thinking" pass first: with show_thinking on, the model writes out a short planning text before it starts denoising, and that plan actually steers the generation.

The inputs that matter

Required inputs are few, which is refreshing for a node this capable:

  • prompt - the whole point. Long, descriptive natural language is the sweet spot; that's what the architecture is for.
  • image_ratio - the aspect ratio, as a dropdown: 1:1, 4:3, 3:4, 16:9, 9:16. These map to fixed resolutions internally (1024×1024, 768×1024, and so on).
  • cfg_text_scale - CFG text scaling, default 4.0, range 1–8. This is how strongly the image follows your prompt; the official app recommends 4–8.
  • num_timesteps - denoising steps, default 50. 10–100 is the range.
  • seed - 0 means random; a positive value reproduces.

The optional panel is where the flavor lives: cfg_interval (start of the CFG interval, default 0.4), timestep_shift (default 3.0 - shift how denoising steps are allocated; higher favors layout, lower favors detail), cfg_renorm_min and cfg_renorm_type (global, local, or text_channel) for CFG re-normalization, and text_temperature for the planning text when thinking is enabled. The defaults are sensible - you can genuinely run this node with just prompt and image_ratio set.

Two outputs come out: image (an IMAGE tensor, wired straight into a Preview Image / Save Image node) and thinking (a STRING with the planning text, only populated when show_thinking is on - great for debugging why a prompt went sideways, or just for curiosity).

Installing and running it

The node ships in the ComfyUI-BAGEL pack. Install via ComfyUI Manager (search "ComfyUI-BAGEL") or:

cd ComfyUI/custom_nodes
git clone https://github.com/neverbiasu/ComfyUI-BAGEL
cd ComfyUI-BAGEL && pip install -r requirements.txt

Restart ComfyUI, then load a BAGEL model first - this node's model input comes from the BAGEL Model Loader, and there's no workflow without it. The heavy lifting is the model itself: budget for a ~20GB download and a 24GB card if you don't want to sit through CPU offloading. On a 4090 the pack quotes ~154 seconds for a 1024×1024 generation with the pre-quantized DF11 model - slow by SDXL standards, but you're trading speed for a model that genuinely reads.

Common gotchas

The usual suspects apply. NameError: 'Qwen2Config' is not defined on load means the environment is missing flash-attention or triton - the README's fix is installing those wheels (see the pack's issue tracker for Windows builds). If generation errors out immediately, check that your loader node actually produced a BAGEL_MODEL and that quantization is set correctly (NF4/INT8 need bitsandbytes; the DF11 model needs dfloat11). And don't expect SDXL speed - if your first run takes a few minutes, that's the model, not a broken install.

CategoryBAGEL/Deprecated

Inputs (12)

NameTypeDefaultDescription
modelBAGEL_MODELBAGEL model
promptSTRINGA female cosplayer portraying an ethereal fairy or elf, wearing a flowing dress made of delicate fabrics in soft, mystical colors like emerald green and silver. She has pointed ears, a gentle, enchanting expression, and her outfit is adorned with sparkling jewels and intricate patterns. The background is a magical forest with glowing plants, mystical creatures, and a serene atmosphere.Text prompt
seedINT00–1000000Random seed, 0 for random
image_ratioCOMBO1:1Image aspect ratio
cfg_text_scaleFLOAT4.01–8CFG text scaling
num_timestepsINT5010–100Denoising steps
show_thinkingoptBOOLEANfalseDisplay reasoning process
cfg_intervaloptFLOAT0.40–1CFG interval start value
timestep_shiftoptFLOAT3.01–5Timestep offset
cfg_renorm_minoptFLOAT0.00–1CFG re-normalization minimum value
cfg_renorm_typeoptCOMBOglobalCFG re-normalization type
text_temperatureoptFLOAT0.30–1Text generation temperature

Outputs (2)

NameTypeDescription
imageIMAGE
thinkingSTRING