ComfyUI Node

sum_editor

Sum_editor

By cardenluo·Created 2 years ago·Updated about 22 hours ago· 324
sum_editor
  • context
  • model
  • clip
  • positive
  • negative
  • vae
  • latent
  • latent_image
  • latent_mask
  • context
  • model
  • positive
  • negative
  • latent
  • vae
  • clip
  • latent_image
  • latent_mask
steps0
cfg0.00
samplerNone
schedulerNone
pos
neg
guidance0.00
styleNone
batch_size1
ratio_selectedNone
width512
height512

The whole point of the Apt_Preset context system is that you set your defaults once in the loader and never touch them again. sum_editor is the deliberate exception - the node you drop into the chain when you want to change something for this leg only. Same model, different prompt. Same latent, different sampler. Same everything, but now with a mask and an inpaint pass. It's the pack's version of the "edit" node, and it slots in anywhere between the loader and the sampler.

Think of it as a context override station. Every field on it has a "leave blank to inherit from context" behavior, so it's entirely optional to use - you can chain it with nothing connected and it just passes the context through. Connect one thing, and you've got a targeted edit.

What it actually does

It takes the incoming RUN_CONTEXT and, for every field you set, overrides the corresponding value in the context before passing it on. The mechanism is in the field semantics: steps, cfg, sampler, scheduler, and guidance default to 0/None, and the tooltip spells it out - 0 == None means "don't override, inherit from context." If you plug in a positive value, that's what downstream sampling uses. It also rebuilds the latent if you give it latent_image (VAE-encoded), optionally with a latent_mask for masked editing - which is how you do a localized inpaint without breaking the chain.

The inputs that matter

  • context - required. The bundle you're editing.
  • pos / neg - prompt overrides. Blank inherits; non-blank re-encodes through the context's clip.
  • style - the pack's 323-entry style library (通用-基础, SAI官方-*, and friends). Picks one and appends its positive/negative text to your prompts.
  • latent_image / latent_mask - give it an image plus a mask and it encodes the image, attaches the mask as a noise mask, and hands the latent to the sampler. That's your inpainting path.
  • ratio_selected / width / height / batch_size - aspect-ratio presets and geometry, applied when you're making a fresh latent rather than editing an existing one.
  • model / clip / positive / negative / vae / latent - direct overrides if you need to swap the actual objects, not just the numbers.

The outputs that matter

context plus passthroughs of model, positive, negative, latent, vae, clip, latent_image, latent_mask. The last two come back out because the pack's sampler and other tools can read them for post-pass work.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
cd ComfyUI-Apt_Preset
pip install -r requirements.txt   # Windows: double-click install.bat

Or ComfyUI Manager → ComfyUI-Apt_Preset.

Common issues

The 0 == None convention is the #1 confusion source. It's an inversion of every other node you've used: setting steps to 0 is not a request for zero steps, it's "leave the loader's value alone." If your edit seems to do nothing, you almost certainly set a field to its inherit value and expected it to matter, or you set a non-inherit value and expected it to be ignored. Second: sum_editor re-encodes text through the context's clip, so if you type a prompt while the context has no clip, you'll get nothing - keep the clip alive upstream. And note the README update history: the pack explicitly keeps sum_editor compatible with Flux 2 Klein's latent sizing, so this is the node to reach for when your Klein workflow needs a mid-chain size or mask change.

CategoryApt_Preset/chx_load

Inputs (21)

NameTypeDefaultDescription
contextRUN_CONTEXT
modeloptMODEL
clipoptCLIP
positiveoptCONDITIONING
negativeoptCONDITIONING
vaeoptVAE
latentoptLATENT
latent_imageoptIMAGE
latent_maskoptMASK
stepsoptINT00–10000 0 == None
cfgoptFLOAT0.000–100 0 == None
sampleroptCOMBONone45 options: None, euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, +39
scheduleroptCOMBONone10 options: None, simple, sgm_uniform, karras, exponential, ddim_uniform, +4
posoptSTRING
negoptSTRING
guidanceoptFLOAT0.000–100
styleoptCOMBONone323 options: None, 通用-基础, 通用-写实, 通用-效果图, 通用-纯净, SAI官方-3d模型, +317
batch_sizeoptINT11–300
ratio_selectedoptCOMBONone32 options: None, customer_WxH, [384x512]AD, [512x384]AD, [512x512]1:1, [512x768]2:3, +26
widthoptINT5128–16384
heightoptINT5128–16384

Outputs (9)

NameTypeDescription
contextRUN_CONTEXT
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
latentLATENT
vaeVAE
clipCLIP
latent_imageIMAGE
latent_maskMASK