Skip to content
Proyectos

Acerca de

Attention Couple for SDXL and Anima; NegPiP (negative weights in prompts) for SDXL, Anima and MOSS Image; etc.

Diseño y multimedia

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
+2
in 15 days
+6
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

ComfyUI-ppm

Just a bunch of some random nodes modified/fixed/created by me and/or others. If any node starts throwing errors after an update - try to delete and re-add the node.

You can browse example workflows for MOSS Image and SDXL NoobAI inside ComfyUI's "Browse Templates/Custom Nodes/ComfyUi-ppm" menu. I'll probably add some more examples in future (but I'm kinda lazy, kek).

Nodes

CLIP NegPip

[!TIP]

See "moss+negpip" or "attention_couple+negpip" from ComfyUI's "Browse Templates" menu.

Allows you to use negative weights in prompts. Negative weights can be used in both CFG models (such as SDXL) and Guidance-Distilled models (such as the turbo versions of Anima and MOSS Image) to negate a concept or a trait.

Examples

moss+negpip - MOSS Image with Mario wearing a (red:-1) cap. Scene: (simple background:-1), (blurry:-1), castle. - the cap comes out green and the background stays a detailed castle instead of a plain blurred one:

MOSS Image with negative weights

Three characters placed with Create Bounding Boxes (PPM) + MOSS-Image Layout Prompt (moss+regions / moss+regions+negpip) - adding (pink:-2) to the middle region and (lavender:-2) to the right one strips those tints from the outfits:

moss+regions moss+regions+negpip
MOSS Image with region prompts MOSS Image with weighted region prompts

Supports:

  • SD1
  • SDXL
  • Anima
  • MOSS Image - also enables regular prompt weighting like (word:2)

Description

Modified implementation of NegPiP by laksjdjf and hako-mikan. It uses ModelPatcher instead of monkey-patching, which should increase compatibility with other nodes.

MOSS Image ignores token weights in vanilla ComfyUI, so CLIP NegPip re-enables the syntax and applies the weights inside attention instead of on the text embeddings.

You can read more about NegPiP in the original repo. When used together with tag-based models, you should keep all commas inside weight braces (i.e. (worst quality,:-1.3) (sketch,:-1.1) instead of (worst quality:-1.3), (sketch:-1.1),). Some tag-based models (Illustrious/NoobAI) perform better with commas in braces, while other models (like Anima) perform better with commas outside of emphasis blocks - feel free to experiment.

[!NOTE] CLIP NegPip is compatible with:

CLIP NegPip is incompatible with:

AttentionCouplePPM

[!TIP]

Connect this node after other model patches (such as CLIP NegPip, EasyCache, LazyCache, etc.).

See "attention_couple+negpip" and "attention_couple_with_global_prompt" from ComfyUI's "Browse Templates" menu.

[!NOTE] You can also use the version from ComfyUI prompt control (doc) - it has a convenient prompt-based approach that doesn't require to add new cond/mask nodes for each new region.

Supports:

  • SD1
  • SDXL
  • Anima

Modified implementation of AttentionCouple by laksjdjf and Haoming02, made to be more compatible with other custom nodes.

Inputs for new regions are managed automatically: when you attach cond/mask of a region to the node, a new cond_ / mask_ input appears. Link base_cond input to the positive conditioning used in KSampler/SamplerCustom.

You can use multiple LatentToMaskBB nodes to set bounding boxes for AttentionCouplePPM. The parameters are relative to your initial latent: x=0.5, y=0.0, w=0.5, h=1.0 will produce a mask covering the right half of the image.

You can adjust mask values to set region strength and use ConditioningSetAreaStrength to increase/decrease conditioning strength.

Create Bounding Boxes (PPM)

Vibecoded port of ComfyUI's Create Bounding Boxes node with a box editor that also works with Nodes 2.0 disabled.

Create Bounding Boxes (PPM)

The stock box editor is a Vue-only widget: with Nodes 2.0 turned off, the classic canvas shows just a placeholder and the boxes cannot be edited. This node keeps the same inputs and outputs (preview, bboxes, elements) and adds a DOM widget editor for the classic canvas: draw/move/resize boxes with grid snapping, per-box type (object/text), text, description and color palette. With Nodes 2.0 enabled the stock Vue editor is used and the DOM editor stays hidden.

  • When background is connected, the canvas background and width/height are taken from the image after the node has run once.
  • width/height accept links (e.g. Empty Latent Image (Aspect Ratio) → Latent to Width & Height). The canvas adopts the size the node actually executed with and keeps the boxes in their relative positions in that frame.
  • A new value on the bboxes input re-initializes the canvas; canvas edits are kept until the upstream value changes again.
  • Clicking a box's number badge selects that box and raises it above the others, so a box can be picked out of a stack of overlapping ones.

Anima Reference (PPM)

Adds Anima Reference (PPM), Anima Reference Guidance (PPM), Reference Cond (PPM), and Reference Gallery (PPM) nodes that can load various Anima reference adapters, tune their settings, load and store reference images. All nodes have a description and tooltips inside ComfyUI.

Anima Reference (PPM)

Modified implementation of ComfyUI-Anima-Ref-Adapter by ArcAnima and SnapRef by ArcAnima that should be compatible with various model patches (i.e. CLIP NegPip) and guiders.

Supported adapters (download and put them into models/loras folder):

For adjusting additional settings like reference guidance strength or fidelity at the cost of inference speed, add Anima Reference Guidance (PPM) node after Anima Reference (PPM).

Reference Gallery (PPM)

Manages reference images as a gallery stored in input/refs_ppm and outputs them as PPM_REF_COND, so a whole library fits into one node instead of a pile of Load Image + Reference Cond (PPM) nodes.

character grid per-reference settings
Reference Gallery (PPM) character grid Reference Gallery (PPM) reference editor
  • Each character corresponds to a folder inside input/refs_ppm/. New characters and images can be added with node buttons, with dragging images onto the grid, or with pasting them while the node is selected. Each character can have multiple images - you can manage them by pressing Images button, or by double clicking on a character.
  • Every character has its own optional global prompt/description - you can set it inside Rename menu.
  • Every reference image has its own optional prompt/description and strength, and can be switched off without deleting it. A reference with an empty prompt inherits the character prompt (when set).

The example workflow with toy_soldier being picked in the gallery node:

Reference Gallery (PPM) in the anima_ref workflow

Attention Selectors

Model Attention Selector and CLIP Attention Selector nodes, can be used to swap the optimized attention algorithm, such as pytorch (SDPA), sage (SageAttention), xformers, etc., without restarting ComfyUI.

DynSamplerSelect

Modified samplers from Euler-Smea-Dyn-Sampler by Koishi-Star.

Contains some new samplers: euler_ancestral_dy, dpmpp_2m_dy and dpmpp_3m_dy.

Tweaking s_dy_pow may reduce blur artifacts (optimal value is 2 for euler_* samplers and -1 for dpmpp_* samplers, use -1 to disable this feature).

CFG++SamplerSelect

Samplers adapted to CFG++: Manifold-constrained Classifier Free Guidance for Diffusion Models by Chung et al.. Also contains converted samplers from Euler-Smea-Dyn.

Should greatly reduce overexposure effect. Use together with SamplerCustom node. Don't forget to set CFG scale to 1.0-2.0 and PAG/SEG scale (if used) to 0.5-1.0.

Guidance Limiter

Implementation of Applying Guidance in a Limited Interval Improves Sample and Distribution Quality in Diffusion Models by Kynkäänniemi et al. as a post CFG function.

Guidance Limiter is also available as a CFGLimiterGuider guider node for SamplerCustomAdvanced.

C2FG

Implementation of C2FG: Control Classifier-Free Guidance via Score Discrepancy Analysis by Gao et al. as a time-dependent CFG scale: cfg * exp(growth_rate * (1 - t/t_max)).

Improves overall image clarity and enhances small details by boosting CFG at later stages of denoising. Should be compatible with any model that is not CFG-distilled (the node doesn't work when CFG is set to 1.0).

Guidance is equal to the cfg from the sampler at the highest noise level and grows to cfg * e^growth_rate by the last steps. Set growth_rate to 0.0 to disable the schedule (1.0 is the best value from the paper).

Temperature Sampling (PPM)

Implementation of Diversify Diffusion with Temperature Sampling and Variance-Corrective Time Shifting (Li et al., 2026).

  • gamma < 1.0 increases sampling diversity, 1.0 disables temperature sampling.
  • start_percent/end_percent sets sampling window.

Epsilon Scaling (PPM)

Modified version of ComfyUI's Epsilon Scaling node with a hacky (and mathematically incorrect) support for v-pred ZSNR models.

Tile Preprocessor (PPM)

Image preprocessor for ControlNet Tile that doesn't require any third-party libraries (aside from kornia, which is a part of ComfyUI's requirements).

Post-CFG nodes

Post-CFG variants of some nodes - they should have increased compatibility with other CFG-related nodes, making it possible to chain them together:

Empty Latent Image (Aspect Ratio)

Generates empty latent with specified aspect ratio and with respect to target resolution.

CLIPTextEncodeBREAK

A small lightweight wrapper over ConditioningConcat node. It splits prompts into chunks by BREAK keyword and produces a single concatenated conditioning.

CLIPTokenCounter

Counts tokens in your prompt and returns them as a string. You can use Preview Any node to display them.

Hooks/Hijacks

Schedulers

Adds some schedulers to the default list from ComfyUI by replacing comfy.samplers.calculate_sigmas function:

Explorar proyectos relacionados

Cargando…