Skip to content
Node packVerifiedExternal
Open source

ComfyUI-ppm

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

Maintainer@pamparammBgrade

Package profile

Status
Verified
Publisher
@pamparamm
Source
GitHub
Stars
271

README

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 FLUX 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

CLIPNegPip

[!TIP]

See "attention_couple+negpip" or "flux_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 Flux) to negate a concept or a trait.

Supports:

  • SD1
  • SDXL
  • Anima
  • FLUX Unmaintained

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

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] CLIPNegPip is compatible with:

CLIPNegPip is incompatible with:

AttentionCouplePPM

[!TIP]

Connect this node after other model patches (such as CLIPNegPip, 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.

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.

Nodes in this pack

33 nodes
  • AttentionCouplePPM
  • CADSPPM
  • CFGLimiterGuider
  • CFGPPSamplerSelect
  • CLIPAttentionSelector
  • CLIPMicroConditioning
  • CLIPNegPip
  • CLIPTextEncodeBREAK
  • CLIPTextEncodeInvertWeights
  • CLIPTokenCounter
  • ConditioningZeroOutCombine
  • ConvertTimestepToSigma
  • DynamicThresholdingPost
  • DynamicThresholdingSimplePost
  • DynSamplerSelect
  • EmptyLatentImageAR
  • EpsilonScalingPPM
  • FreeU2PPM
  • Guidance Limiter
  • LatentOperationTonemapLuminance
  • LatentToMaskBB
  • LatentToWidthHeight
  • MaskCompositePPM
  • ModelAttentionSelector
  • PPMSamplerSelect
  • RenormCFGPost
  • RescaleCFGPost
  • SamplerER_SDEScheduled
  • SamplerGradientEstimation
  • SamplerSEEDS2Scheduled
  • SkipFirstStepCFG
  • TCFGAdvanced
  • TilePreprocessorPPM

Related resources

29 connections

Sources

3 sources
GitHubSource
github.com/pamparamm/ComfyUI-ppm

Verified Oct 25

GitHubSourceVersion 6c6c360155cace9d7091306c1b8e26d9c7438620
github.com/pamparamm/ComfyUI-ppm

Verified Oct 14

Source excerpts

1 excerpt

Source context: Repo pamparamm/ComfyUI-ppm