Nodes/comfyui-magic-clothing/Additional Features With Attention
ComfyUI Node

Additional Features With Attention

The all-in-one Magic Clothing patch, before they split it in two

By longgui0318·Created 2 years ago·Updated 2 years ago· 82
Additional Features With Attention
  • model
  • clip
  • feature_image
  • MODEL
  • SEED
  • SAMPLER_NAME
  • SCHEDULER
seed0
sampler_name
scheduler
feature_unet_name
enable_feature_guidancetrue
feature_guidance_scale2.5

Additional Features With Attention is the prototype. Before this pack split "load the Magic Clothing weights" and "patch them into your model" into two separate nodes, this one did both jobs in a single box - and it threw the sampler knobs out alongside them, so you could wire it almost directly into a KSampler.

You'll meet it only in older workflows, and honestly that's the main reason to know it: it's the version of Load Magic Clothing Model + Add Magic Clothing Attention that existed before the pack was renamed and reorganized. If a workflow from mid-2024 references it, this is what the graph looked like.

What it takes

  • model (MODEL) - your base model. Note this version takes a single model, not the source/patched pair the current nodes want. It loads the Magic Clothing UNet itself.
  • clip (CLIP) - for the empty-prompt feature-extraction pass.
  • seed, sampler_name (22 samplers), scheduler (6 schedulers) - passed through untouched.
  • feature_image (LATENT) - the VAE-encoded garment crop.
  • feature_unet_name - a dropdown of the UNet files in ComfyUI/models/unet (the Magic Clothing adapter weights).
  • enable_feature_guidance (default true) and feature_guidance_scale (default 2.5).

What it gives

Four outputs: MODEL, SEED, SAMPLER_NAME, and SCHEDULER. The last three are just the inputs echoed back out, which is the node's way of handing you the KSampler's controls so it can sit right before the sampler in the graph:

... → Additional Features With Attention → KSampler
             (model)                        ↑ model
             (seed, sampler, scheduler) ─────┘

How it works

The mechanism is the same attention-replay trick as the current nodes, with one extra step. It loads the Magic Clothing UNet straight from the file (comfy.sd.load_unet), attaches a patch that records the clothing latent's attention activations, then runs an actual denoising pass over the garment with your chosen sampler and scheduler to capture those features the way the reference implementation would. Those stored features get injected into the base model's attention during generation, and the CFG wrapper applies the three-branch feature guidance: uncond + cfg*(text - cloth) + feature_guidance_scale*(cloth - uncond).

Because feature_guidance_scale here goes up to 100 (the current node caps at 10), you have more room to over-drive the cloth branch - which mostly means more ways to make the garment warp, so don't take the ceiling as a recommendation.

Install

Same pack, same steps:

cd ComfyUI/custom_nodes
git clone https://github.com/longgui0318/comfyui-oms-diffusion
# restart ComfyUI

ComfyUI Manager works too - search "comfyui-magic-clothing".

If you're starting fresh, don't go hunting for this node; the split design (Load Magic Clothing ModelAdd Magic Clothing Attention) is strictly better and is what the example workflows use. Treat this one as a time capsule for debugging old graphs: it's the same idea, packed into one node with fewer safety rails.

Categoryloaders

Inputs (9)

NameTypeDefaultDescription
modelMODEL
clipCLIP
seedINT00–18446744073709550000
sampler_nameCOMBO22 options: euler, euler_ancestral, heun, heunpp2, dpm_2, dpm_2_ancestral, +16
schedulerCOMBO6 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform
feature_imageLATENT
feature_unet_nameCOMBO0 options:
enable_feature_guidanceBOOLEANtrue
feature_guidance_scaleFLOAT2.50–100

Outputs (4)

NameTypeDescription
MODELMODEL
SEEDINT
SAMPLER_NAMEeuler,euler_ancestral,heun,heunpp2,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,lcm,ddim,uni_pc,uni_pc_bh2
SCHEDULERnormal,karras,exponential,sgm_uniform,simple,ddim_uniform