ComfyUI Node

SegmindVega

The pack's SDXL generation node, quirks included

By taabata·Created 3 years ago·Updated 2 years ago· 259
SegmindVega
  • pipe
  • image
  • reference_image
  • LATENT
device
mode
seed0
original_prompt
prompt
negative_prompt
steps4
width512
height512
cfg8.0
style_fidelity0.50
strength1.0
editing_early_steps1000
batch1
ipadapter_scale0.6
reference_only
ip_adapter

SegmindVega is the generate node for the pack's SDXL experiment, and the first thing to know is that it's the odd one out: it's the only generate node in the pack that outputs a LATENT instead of an IMAGE. You feed it a pipeline from Loader_SegmindVega, and it returns latent samples scaled for ComfyUI's VAEDecode - which is the correct way to interface with the rest of a normal ComfyUI graph, and also the one place this pack meets the native ecosystem halfway.

It presents itself as a variation/editing node - mode picks variation or editing, and there are fields for an original prompt, editing early steps, reference image, style fidelity and strength. Here's the honest bit: in the shipped code, most of that machinery is commented out. The image you feed in gets converted to PIL and then... never passed to the pipeline. What actually runs is a latent-output pass keyed on the prompt (plus the negative prompt, steps, CFG) at whatever batch size you asked for. ip_adapter is the one toggle that still does something live - it calls set_ip_adapter_scale on the pipe before running.

How it works

The active call is short: pipe(prompt=..., negative_prompt=..., num_inference_steps=steps, guidance_scale=cfg, output_type="latent"), then the result is divided by 0.13025 - the SDXL latent scaling factor - and wrapped as {"samples": ...}, which is the LATENT dict VAEDecode expects. mode, original_prompt, editing_early_steps, reference_image, style_fidelity and strength are all wired into the node signature but inert in the current code; ip_adapter and ipadapter_scale act on the loaded pipeline. So think of this as "fast SDXL text-to-latent with an optional IP-Adapter scale hook" and you'll be closer to reality than the node's own labels.

The inputs that matter

  • pipe - the class output from Loader_SegmindVega.
  • prompt / negative_prompt - what actually drives generation.
  • steps - 4 by default (it's an LCM-LoRA pipeline; this is correct).
  • cfg - 8.0 default, matching the SDXL-vega/LCM blend the loader sets up.
  • width / height - 512 default.
  • batch - number of latents to generate (0–1000).
  • ip_adapter + ipadapter_scale - the one live conditioning control.
  • image, reference_image, mode, original_prompt, editing_early_steps, style_fidelity, strength - accepted, but not used by the shipped code path. Set them if you like; just don't expect them to change output yet.

Output: LATENT → wire into a VAEDecode node, then any image node.

How to install it

Pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/taabata/LCM_Inpaint-Outpaint_Comfy
cd LCM_Inpaint-Outpaint_Comfy
pip install -r requirements.txt

Or ComfyUI Manager → "LCM_Inpaint_Outpaint_Comfy" → restart. The loader needs the Vega SDXL model in models/diffusers/ and pytorch_lora_weights_vega.safetensors in models/loras/ - the SDXL LoRA, not the 1.5 one.

Common issues

The biggest gotcha is expectations, not errors: people wire an image in, pick variation mode, and get a prompt-driven latent that ignores the image entirely. That's the commented-out code, and it's the single most confusing thing about this node. If variation behavior is what you need, the reference line of this pack does that properly - or a native ComfyUI img2img graph.

Also remember the handoff: output is a LATENT, so you must go through VAEDecode (or a latent-to-image path) before a save node - a direct IMAGE wire won't exist. If you're new to this pack and just want fast images, the LCMLora line is more finished; SegmindVega is the pack stretching toward SDXL with some rough edges still showing.

CategoryLCM_Nodes/nodes

Inputs (20)

NameTypeDefaultDescription
pipeclass
deviceCOMBO2 options: cuda, cpu
modeCOMBO2 options: variation, editing
seedINT00–18446744073709550000
original_promptSTRING
promptSTRING
negative_promptSTRING
stepsINT40–360
widthINT5120–5000
heightINT5120–5000
cfgFLOAT8.00–30
imageIMAGE
reference_imageIMAGE
style_fidelityFLOAT0.500–1
strengthFLOAT1.00–1
editing_early_stepsINT10000–5000
batchINT10–1000
ipadapter_scaleFLOAT0.60–10
reference_onlyCOMBO2 options: disable, enable
ip_adapterCOMBO2 options: disable, enable

Outputs (1)

NameTypeDescription
LATENTLATENT