Nodes/Binyuan Sampler V2.3 EN (Bilingual)/🛡️ Binyuan Sampler V2.3 EN|中英双语版
ComfyUI Node

🛡️ Binyuan Sampler V2.3 EN|中英双语版

Loader, Prompt Box, KSampler and VAE Decode in One Node

By yjitiu·Created about a month ago·Updated 6 days ago· 2
🛡️ Binyuan Sampler V2.3 EN|中英双语版
  • external_model
  • external_clip
  • external_vae
  • external_latent
  • external_sigmas
  • external_positive
  • external_negative
  • lora_settings
  • upstream_image_1
  • upstream_image_2
  • upstream_image_3
  • IMAGE / 图像
  • MODEL / 模型
  • CLIP
  • VAE
  • LATENT / Latent
  • POSITIVE / 正面条件
  • NEGATIVE / 负面条件
  • DENOISED / 降噪Latent
◄load_modeCheckpoint (whole file) | 整包Checkpoint►
◄checkpointNone►
◄diffusion_modelNone►
◄clip_1None►
◄clip_2None►
◄clip_typeflux►
◄vaebaked_vae►
◄weight_precisiondefault►
◄chaining_modeInherit upstream | 继承上游模型►
◄upstream_image_handlingRe-encode with VAE | 重新VAE编码►
◄latent_sourceUpstream image first | 上游图像优先►
◄positive_promptmasterpiece, best quality, 1girl►
◄negative_prompt►
◄size_presetCustom | 自定义►
◄width1024►
◄height1024►
◄batch_size1►
◄seed0►
◄steps20►
◄cfg1.0►
◄flux_guidance3.5►
◄samplereuler►
◄schedulersimple►
◄denoise1.00►
◄lora_json[]►
◄lora_list▾►
◄cleanup_vramfalse►
◄moss_model_path►
◄moss_text_devicedefault►
◄moss_shift5.0►
◄moss_uncond_skip_layers22►
◄flux3_edit_modeAuto►
◄qwen_reference_resolution1024►
◄qwen_edit_modeAuto | 自动►
◄attention_backendAuto safe | 自动稳定►
◄advanced_samplingfalse►
◄start_at_step0►
◄end_at_step10000►
◄add_noisetrue►
◄return_with_leftover_noisefalse►
◄noise_strength1.00►

If you've stared at a 30-node ComfyUI graph and thought "this is four wires and a tin of noodles," the Binyuan sampler is aimed at you. It's one node - class BinyuanUltimateSamplerEN, display name 🛡️ Binyuan Sampler V2.2 EN|中英双语版, category Binyuan - that loads a checkpoint or a split stack, encodes both prompts, builds the latent, samples, decodes, and hands you a finished IMAGE. It also exposes model, CLIP, VAE, conditioning and latents as outputs so you can chain it into a second stage.

This is the bilingual build; the Chinese edition uses a different node key, so both can live side by side. It's MIT and declares zero dependencies, which is rare for a pack with this much surface area.

Why the all-in-one shape exists

This is the context-bus pattern: instead of dragging model, clip, vae, conditioning, latent, size, steps and seed across the graph as a dozen parallel wires, you bundle them. Efficiency Nodes popularized it, ComfyUI-Easy-Use threads a pipe dict - same idea, bigger surface. The payoff is legibility. The failure mode is stale contents: when one node holds everything, it's easy to run base weights while believing a LoRA is applied. Binyuan's loader lives inside the sampler, so nothing gets unpacked out of order - but the LoRA panel, chaining mode and latent source decide what's inside the bundle, and you have to read them.

How it works

Two load modes. Checkpoint (whole file) picks a baked checkpoint. Separate (Flux/SD3/Diffusion) takes a diffusion model, clip_1, optional clip_2, a vae (default baked_vae) and a clip_type from a 30-entry list - flux, flux2, krea2, hidream, hunyuan_image, chroma and friends. .gguf files show up in those dropdowns because the node dynamically imports City96's ComfyUI-GGUF rather than vendoring it.

Sampling runs on ComfyUI's public API: 44 samplers (euler default), 9 schedulers (simple default), and a weight_precision cast (fp8_e4m3fn, nvfp4, bf16…). Prompt boxes support {a|b|c} dynamic prompts drawn from the seed.

One genuinely unusual knob: attention_backend, defaulting to Auto safe. For a Krea2 or Qwen-Image-2.1 model loaded by this node it can pick Comfy Kitchen when available, otherwise ComfyUI's sub-quadratic backend - a model-local patch, not a startup flag, so models wired in from elsewhere keep their own setup.

The controls you'll actually touch

  • load_mode / checkpoint / diffusion_model / clip_type / vae - your model. clip_type must match the architecture; a mismatch is the classic "why is my conditioning garbage" cause.
  • positive_prompt / negative_prompt - plain text boxes, {a|b|c} supported.
  • steps, cfg, sampler, scheduler, denoise, seed, width, height, batch_size - the usual. cfg defaults to 1 and flux_guidance to 3.5, right for distilled models: at exactly 1 ComfyUI skips the negative pass rather than weighting it to zero.
  • chaining_mode - Own model, Inherit upstream, Auto detect. Inherit upstream reuses external_model / external_clip / external_vae, so a second sampler doesn't load the weights twice.
  • latent_source - Empty latent, External latent first, Upstream image first, Stitch upstream images. The older upstream_image_handling widget is kept only for workflow compatibility; latent_source drives behavior.
  • lora_json - the + Add LoRA panel writes here, but it also parses plain text (name.safetensors:0.8, one per line, # comments) or a JSON array with per-model and per-CLIP strengths.

Outputs, in order: IMAGE, MODEL, CLIP, VAE, LATENT, POSITIVE, NEGATIVE, DENOISED. IMAGE into SaveImage is the whole beginner workflow; feed MODEL/CLIP/VAE/LATENT into a second Binyuan node to skip a reload. Two newer clusters: advanced_sampling turns steps into a total schedule and makes start_at_step / end_at_step / add_noise / return_with_leftover_noise authoritative (denoise is ignored there), and noise_strength (0–2) scales initial noise in both modes. For Qwen-Image-2.1, qwen_edit_mode plus qwen_reference_resolution: native reference editing starts from an empty latent so the node pins denoise to 1.0, while VAE redraw keeps the source canvas and takes 0.25–0.55 happily.

Install

ComfyUI Manager → search "Binyuan Sampler". Or:

cd ComfyUI/custom_nodes
git clone https://github.com/yjitiu/ComfyUI-Binyuan-Sampler-EN
# restart ComfyUI, then hard-refresh the browser (Ctrl+F5)

The folder name doesn't matter; the folder's contents do. Keep __init__.py, js/, locales/, LICENSE and pyproject.toml - copying just the Python file loses the LoRA panel and the labels. After updating, restart the backend and refresh, then re-add the node if the new widgets still aren't there.

No models ship with it. .gguf support needs ComfyUI-GGUF in custom_nodes/ComfyUI-GGUF. Qwen-Image-2.1 needs a core with TextEncodeQwenImage21, the matching text encoder, and the 64-channel Qwen VAE.

Where people get burned

The attention error that isn't this node's fault. If sampling dies with No operator found for memory_efficient_attention_forward ... requires device with capability <= (9, 0) but your GPU has capability (12, 0), you have xformers installed and its prebuilt kernels don't cover your GPU. Every sampling node fails the same way, stock KSampler included. Fix it at launch:

python main.py --use-pytorch-cross-attention --disable-xformers

Cross-family latents. Flux/Krea and Qwen latents differ in channel count and scaling. Don't pass LATENT between them just because the sockets are the same color - pass IMAGE and let the second model re-encode it.

Knobs that look dead. Low denoise on an empty latent gets protected back to 1; denoise does nothing in advanced mode; noise_strength does nothing there when add_noise is off; a connected external_sigmas overrides steps, scheduler and denoise; end_at_step <= start_at_step skips sampling entirely. And if the step count arrives on a wire from a shared integer, editing the node's own box changes nothing.

Finally: don't install two copies of the same bilingual node ID, and back up custom_nodes before updating. This is a young single-author pack with no cross-version compatibility guarantee.

CategoryBinyuan

Inputs (52)

NameTypeDefaultDescription
load_modeCOMBOCheckpoint (whole file) | 整包Checkpoint2 options: Checkpoint (whole file) | 整包Checkpoint, Separate (Flux/SD3/Diffusion) | 分离式(Flux/SD3/扩散)
checkpointCOMBONone1 options: None
diffusion_modelCOMBONone1 options: None
clip_1COMBONone1 options: None
clip_2COMBONone1 options: None
clip_typeCOMBOflux32 options: ACE, boogu, chroma, cogvideox, cosmos, flux, +26
vaeCOMBObaked_vae1 options: baked_vae
weight_precisionCOMBOdefault9 options: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2, nvfp4, pid, +3
chaining_modeCOMBOInherit upstream | 继承上游模型3 options: Own model | 使用自身模型, Inherit upstream | 继承上游模型, Auto detect | 自动检测
upstream_image_handlingCOMBORe-encode with VAE | 重新VAE编码3 options: Re-encode with VAE | 重新VAE编码, Use directly as latent | 直接作为Latent, Auto | 自动选择
latent_sourceCOMBOUpstream image first | 上游图像优先4 options: Empty latent | 空Latent, External latent first | 外部Latent优先, Upstream image first | 上游图像优先, Stitch upstream images | 上游图像拼接
positive_promptSTRINGmasterpiece, best quality, 1girl支持 {a|b|c} 动态提示词抽签:每次点 Run 重新随机抽一个。网页点 Run 由前端抽签;连线传入或 API/外部调用由节点在服务端抽签。{ } 必须成对,选项之间用半角竖线 | 。
negative_promptSTRING同上,负向提示词同样支持 {a|b|c} 抽签。
size_presetCOMBOCustom | 自定义25 options: Custom | 自定义, 512x512, 512x768, 768x512, 768x768, 768x1024, +19
widthINT102464–8192—
heightINT102464–8192—
batch_sizeINT11–100—
seedINT00–18446744073709550000—
stepsINT201–100—
cfgFLOAT1.00–20—
flux_guidanceFLOAT3.50–10—
samplerCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBOsimple9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseFLOAT1.000–1—
lora_jsonSTRING[]—
lora_listCOMBO1 options: None
cleanup_vramBOOLEANfalse—
external_modeloptMODEL—
external_clipoptCLIP—
external_vaeoptVAE—
external_latentoptLATENT—
external_sigmasoptSIGMAS—
external_positiveoptCONDITIONING—
external_negativeoptCONDITIONING—
lora_settingsoptBINYUAN_LORA_SETTINGS—
upstream_image_1optIMAGE—
upstream_image_2optIMAGE—
upstream_image_3optIMAGE—
moss_model_pathoptSTRINGLocal MOSS HF/Diffusers directory; select clip_type=moss_image. Empty uses separate model/clip/VAE dropdowns. / 本地完整模型目录,留空使用分离权重。
moss_text_deviceoptCOMBOdefault2 options: default, cpu
moss_shiftoptFLOAT5.00.01–100—
moss_uncond_skip_layersoptSTRING22MOSS negative-branch layer skipping; empty disables. / 负分支跳层,留空关闭。
flux3_edit_modeoptCOMBOAutoFLUX 3 Auto/Native: upstream images become references, with an empty output canvas. VAE redraw: initial image latent and adjustable denoise. / 自动或原生编辑使用参考条件与空画布;VAE重绘使用初始图像Latent,可调重绘强度。
qwen_reference_resolutionoptINT10240–4096Qwen-Image-2.1 reference pixel budget (resolution squared); 0 keeps original size, aligned to 32. Editing output follows the first reference. / Qwen-Image-2.1 参考图像素预算(分辨率平方);0 保持原尺寸并对齐32,编辑输出尺寸跟随第一张参考图。
qwen_edit_modeoptCOMBOAuto | 自动Auto keeps existing workflows compatible. Native reference edit uses Qwen-Image-2.1 official reference conditioning and an empty latent (denoise is fixed to 1). VAE redraw encodes the upstream image as the initial latent, preserves its canvas (32-pixel alignment), and enables adjustable denoise. / 自动模式兼容旧工作流;原生参考编辑使用官方参考条件与空Latent(重绘强度固定为1);VAE传统重绘把上游图像编码为初始Latent,保持画布(对齐32)并允许调节重绘强度。
attention_backendoptCOMBOAuto safe | 自动稳定Auto safe uses Comfy Kitchen for internally loaded Krea2/Qwen-Image-2.1 models when available, otherwise ComfyUI's sub-quadratic backend; other models and externally patched models retain their backend. Core default follows ComfyUI startup flags. / 自动稳定为内部加载的Krea2/Qwen-Image-2.1模型选用可用的Comfy Kitchen,否则使用内核分块后端;其他模型与已外接修补的模型保持原后端。内核默认遵循启动参数。
advanced_samplingoptBOOLEANfalseAdvanced step range; steps becomes total schedule steps, denoise is ignored. / 高级分段:步数为总步数,忽略重绘强度。
start_at_stepoptINT00–10000Zero-based start; 10 starts after the first 10 steps. / 从0计数;10表示跳过前10步。
end_at_stepoptINT100000–10000Stop boundary, clamped to total steps. / 结束边界;超过总步数即运行到最后。
add_noiseoptBOOLEANtrueDisable when continuing an upstream noisy LATENT. / 接续上游带噪LATENT时关闭;成图重绘时开启。
return_with_leftover_noiseoptBOOLEANfalseEnable for the first segment; pass LATENT, not denoised_latent, to the next sampler. / 第一段开启,把LATENT传给下一段,不要传去噪Latent。
noise_strengthoptFLOAT1.000–2Initial random-noise multiplier in both modes: 1=normal, 0=no added initial noise. Advanced Add noise OFF overrides this. Does not change sigma schedule or remove existing noise. / 两种模式均有效:1为标准新增噪声,0不新增初始噪声;高级模式关闭添加噪声时本项无效。不改变采样日程,不消除输入已有噪声。

Outputs (8)

NameTypeDescription
IMAGE / 图像IMAGE—
MODEL / 模型MODEL—
CLIPCLIP—
VAEVAE—
LATENT / LatentLATENT—
POSITIVE / 正面条件CONDITIONING—
NEGATIVE / 负面条件CONDITIONING—
DENOISED / 降噪LatentLATENT—