Nodes/Character Face Swap/Generation Parameter Output
ComfyUI Node Runs on cloud

Generation Parameter Output

Unpacking a KSampler settings bundle

By ArtBot2023·Created 3 years ago·Updated 2 years ago· 102
Generation Parameter Output
  • parameters
  • parameters
  • seed
  • image_width
  • image_height
  • steps
  • cfg
  • sampler_name
  • scheduler
  • denoise

If you've loaded the Character Face Swap workflow and wondered what this node is doing sitting between two reroutes, it's a demultiplexer. It takes one bundled PARAMETERS object and unpacks it back into the individual seed, resolution, sampler and scheduler wires that the graph's KSampler actually consumes. It's the receiving end of a pattern the pack uses to keep generation settings in one place.

The transmitter is Generation Parameter Input, and the two are a matched pair - a mux and a demux, borrowed from SeargeSDXL's design. Input bundles eight settings into a single PARAMETERS value; Output splits them out again. Between the two, the settings travel as one tidy wire instead of eight spaghetti strands.

How it works

You feed it a parameters object (from Generation Parameter Input, or any other node that emits the same PARAMETERS type). It reads the keys back out and exposes each one on its own output socket, passing the original bundle through unchanged as well so you can chain further consumers.

The outputs

Eight individual values, each wired to the matching KSampler input in the shipped workflow:

  • seed (INT)
  • image_width / image_height (INT)
  • steps (INT)
  • cfg (FLOAT)
  • sampler_name - a full KSampler sampler list (euler, dpmpp_2m, dpmpp_2s_ancestral, lcm, ddim, uni_pc, and friends)
  • scheduler - normal, karras, exponential, sgm_uniform, simple, ddim_uniform, beta, linear_quadratic, kl_optimal
  • denoise (FLOAT)

Plus the original parameters bundle on its own output, so you can tap the same bundle in multiple places.

Why bother

Honestly, for a single KSampler this is ceremony. Where the pattern pays off is consistency: you set seed/steps/cfg/sampler once in Generation Parameter Input, and every consumer gets the same values, every time, with no chance of editing the KSampler widget directly and having things drift out of sync. In this pack's workflow that matters - the same settings drive the face generation and the composite pass, and you want them identical.

One small delight: the node's Python class is misspelled GenertaionParameterOutput in the source. It's invisible to you (the display name is right), but it's a reminder this is a personal, hand-rolled pack, not a big maintained project - treat its quirks with patience.

Installing the pack

It ships with Character Face Swap - ComfyUI Manager, search Character Face Swap, install, restart. Or:

cd ComfyUI/custom_nodes/
git clone https://github.com/ArtBot2023/CharacterFaceSwap.git
cd CharacterFaceSwap
python install.py          # on the bundled Windows build: ../../../python_embeded/python install.py

This node itself needs nothing special - it's pure data plumbing, no models, no CUDA. The install.py step (which pip-installs the bundled facexlib) is still worth running since the pack as a whole depends on it. For the full workflow you'll also want the ControlNet ip2p model (control_v11e_sd15_ip2p.pth) in ComfyUI/models/controlnet, per the README.

Common problems

  • "KeyError: 'seed'" or similar on execution: you fed it a PARAMETERS object that was built without all eight fields (e.g. an empty dict from a node that only set some). Make sure the bundle came from Generation Parameter Input, not a hand-built partial object.
  • Nothing wires to KSampler's optional inputs: check the socket types - this node emits exactly the types KSampler expects, so a mismatch here usually means you connected the wrong output slot.

Use it as the readout end of a settings bundle, and it'll quietly do its job every time.

CategoryCFaceSwap

Inputs (1)

NameTypeDefaultDescription
parametersPARAMETERS

Outputs (9)

NameTypeDescription
parametersPARAMETERS
seedINT
image_widthINT
image_heightINT
stepsINT
cfgFLOAT
sampler_nameeuler,euler_cfg_pp,euler_ancestral,euler_ancestral_cfg_pp,heun,heunpp2,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_2s_ancestral_cfg_pp,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_cfg_pp,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,lcm,ipndm,ipndm_v,deis,res_multistep,res_multistep_cfg_pp,res_multistep_ancestral,res_multistep_ancestral_cfg_pp,gradient_estimation,ddim,uni_pc,uni_pc_bh2
schedulernormal,karras,exponential,sgm_uniform,simple,ddim_uniform,beta,linear_quadratic,kl_optimal
denoiseFLOAT