🎩SegMoE Generation
SegMoE Generation Inside ComfyUI
- pipe
- IMAGE
🎩SegMoE Generation is the payoff of the pack: the node that actually draws. Feed it the pipe from the SegMoE Model Loader plus a prompt, and it runs the whole diffusion pass internally - denoise, VAE decode, the lot - then hands you a plain IMAGE. What makes it interesting is what's happening under the hood: SegMoE is a training-free Mixture-of-Experts setup, so inside that UNet a router is picking between several full checkpoints token by token. Photoreal faces from one expert, painterly backgrounds from another, decided mid-generation instead of merged into mush upfront. It's a genuinely different way to combine models than the additive merging covered in most ComfyUI lore, and it costs you nothing but VRAM.
How it works
The node takes your positive and negative prompts, bakes them into a seeded torch.Generator, and calls the pipeline with your steps, guidance_scale, width and height. The output PIL images get converted to the standard float 0–1 tensor in NHWC layout, which is why this node plays nice with ComfyUI's normal preview and save nodes even though everything else about it is off-graph. One thing it does not do: give you a sampler choice. The scheduler is whatever the model shipped with (DDPM for the segmind cards), there's no KSampler in the path, and no ControlNet or LoRA wiring - this is a closed box that takes eight inputs and returns one image.
The inputs that matter
- pipe - the output of the Model Loader. The only input you can't set by typing, and the only one that's easy to get wrong: it must come from
SMoE_ModelLoader_Zho, not a normal model loader. - positive / negative - both multiline strings. The defaults are cute ("cosmic canvas, orange city background, painting of a chubby cat") and worth replacing.
- steps - 1 to 100, default 50. The README notes SegMoE's own default is 30; both work, and the node's 50 is fine for quality.
- guidance_scale - 0 to 10, default 5, which matches what the author calls the usual setting.
- width / height - 512 to 2048, stepping by 32, default 1024.
- seed - 0 to a very large number, default 0, for reproducible runs.
That's the whole interface, so the things you'll actually fiddle with are the prompts, the seed, and possibly resolution.
Resolution is where people get burned
The SDXL cards (2x1 and 4x2) want 1024 and are happy there. The SD 1.5-based sd-4x2 card is a different story: SegMoE's own creators have said it suffers duplicated-object weirdness at 1024×1024 and recommend 512–768, same as any SD 1.5 model. If your outputs come back with extra heads or doubled subjects, drop the resolution before you blame the prompt.
Setup and expectations
Install is the usual clone-and-pip (pip install -r requirements.txt installs just diffusers) from the repo, then restart. First run downloads the model into the HF cache, so give it a moment and a few free gigabytes. The README asks for more than 20 GB of VRAM - the whole pipeline sits on the GPU with no offloading - so if you OOM, that's the design, not a bug. The author's speed number (A100, 50 steps, ~17 seconds) is from a data-center card; on a consumer GPU, budget minutes.
The honest take: this is a curiosity more than a daily driver - a self-contained MoE island in a graph that's all about plumbing, and SegMoE itself got a lukewarm reception when it launched in early 2024. But it's also the easiest way to actually feel what router-based merging does, it auto-downloads everything, and for that it's worth one afternoon. Wire its IMAGE into a preview or save node and you're done.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| pipe | MODEL | — | |
| positive | STRING | cosmic canvas, orange city background, painting of a chubby cat | — |
| negative | STRING | nsfw, bad quality, worse quality | — |
| steps | INT | 501–100 | — |
| guidance_scale | FLOAT | 5.000–10 | — |
| width | INT | 1024512–2048 | — |
| height | INT | 1024512–2048 | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |