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

Generation Parameter Input

One place to set every sampler setting

By ArtBot2023·Created 3 years ago·Updated 2 years ago· 102
Generation Parameter Input
  • parameters
  • parameters
seed0
image_width512
image_height512
steps20
cfg7.0
sampler_namedpmpp_2m
schedulerkarras
denoise1.00

Generation Parameter Input is the "control panel" node of the Character Face Swap workflow. It bundles seed, resolution, steps, CFG, sampler, scheduler and denoise into a single PARAMETERS object, which then travels through the graph as one wire until Generation Parameter Output unpacks it back into the individual sockets that a KSampler expects. Set your generation settings once, here, and every KSampler in the graph reads the same values.

It's a pattern borrowed from SeargeSDXL - a mux/demux pair for keeping sampling parameters in one place instead of duplicating widgets across every sampler. For a workflow with two sampling passes (generate the face, then composite), that's genuinely useful: it guarantees both passes use the same seed, same sampler, same CFG, and it makes "why does pass two look different" impossible.

The inputs that matter

  • seed (default 0) - the full 64-bit range. Set a fixed seed here and the whole swap becomes reproducible; randomize in the KSampler instead and you'll get different faces every run, which usually isn't what you want mid-pipeline.
  • image_width / image_height (default 512, 512; step 8) - the generation resolution, capped at 1024. The shipped workflow runs the face generation at 512 and upscales later.
  • steps (default 20) - denoising steps. The workflow ships 25 for the face pass.
  • cfg (default 7.0) - guidance scale.
  • sampler_name (default dpmpp_2m) - the full KSampler sampler list, including euler, dpmpp_2s_ancestral, lcm, ddim, uni_pc, and friends.
  • scheduler (default karras) - normal, karras, exponential, sgm_uniform, simple, ddim_uniform, beta, linear_quadratic, kl_optimal.
  • denoise (default 1.0) - 1.0 for full generation; the composite pass in this pack typically runs a lower denoise (the shipped workflow uses 0.4).

There's also an optional parameters input: you can chain bundles, letting an upstream node override just some fields while the rest fall through. Handy if you're feeding the same settings into multiple sub-workflows.

How it works

mux writes the eight values into a dict and returns it as the single parameters output. Nothing exotic - it's a settings container. The value is in where it sits: upstream of every sampler, so the settings live in exactly one node.

Installing the pack

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

Pure plumbing - no models, no CUDA. The install.py step (bundled facexlib) matters for the pack as a whole, not this node.

Common problems

  • KSampler gets no values / defaults everywhere: the bundle only propagates if the wire actually connects - check that Generation Parameter Output is in the path between this node and the sampler.
  • Odd resolution: image_width/image_height step is 8 and capped at 1024; values outside that just clamp.
  • Overriding doesn't take effect: if you feed an optional parameters bundle, its values overwrite the widgets here. If that's surprising, drop the upstream connection.

Set it once, wire it to the Output node, and let the samplers stay clean.

CategoryCFaceSwap

Inputs (9)

NameTypeDefaultDescription
seedINT00–18446744073709550000
image_widthINT5120–1024
image_heightINT5120–1024
stepsINT200–200
cfgFLOAT7.00–30
sampler_nameCOMBOdpmpp_2m34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28
schedulerCOMBOkarras9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3
denoiseFLOAT1.000–1
parametersoptPARAMETERS

Outputs (1)

NameTypeDescription
parametersPARAMETERS