Skip to content

Latest commit

Β 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Version Last Commit License


ComfyUI LoRA Pipeline

Area-based LoRA conditioning wrappers and LoRA Scheduling nodes for ComfyUI.


Table of Contents


Features

  • Area-based conditioning pipeline for multi-subject and multi-region prompts.
  • One-node scheduled LoRA strength control with a curve preview output.
  • For consistent multi-subject composition across multiple areas, ControlNet + OpenPose is strongly recommended via comfyui-openpose-studio.
  • Without ControlNet/OpenPose, multi-subject multi-area composition is often inconsistent and may require many retries.
  • Python-only: no JavaScript or frontend dependencies required.

Installation

Requirements

  • ComfyUI (recent build)
  • Python 3.10+
  • Optional per-node deps: matplotlib

Steps

  1. Clone this repository into ComfyUI/custom_nodes/.
  2. Restart ComfyUI.
  3. Confirm nodes appear under LoRA Pipeline/.

Recommended setup (multi-area / multi-subject)

  • Use ControlNet OpenPose (recommended): comfyui-openpose-studio.
  • Keep the global prompt minimal and general.
  • Keep global_strength low (rule of thumb: below 0.5).
  • Balance per-area strength, global_strength, and LoRA strength; do not max all strengths.
  • Example baseline values that worked well: area strengths around 0.75, LoRA strengths around 0.90.

Nodes

Conditioning Pipeline (Combine) Conditioning Pipeline (Set Area) Load LoRA (Scheduled)
Conditioning Pipeline (Combine) Conditioning Pipeline (Set Area) Load LoRA (Scheduled)

Conditioning Pipeline (Set Area)

Define one area-conditioned entry at a time. This node defines a rectangular region with width, height, x, and y, then applies a dedicated conditioning prompt and strength to that region as part of a chained conditioning pipeline.

At a glance:

  • Use one node instance per region/subject prompt.
  • Chain multiple instances to build a regional conditioning pipeline.
  • Enables clean multi-subject control before final combine.

Inputs:

  • conditioning (CONDITIONING, required)
  • width, height, x, y (FLOAT, normalized 0.0-1.0)
  • strength (FLOAT, default 1.0)
  • pipeline_in (CONDITIONING_PIPELINE, optional)

Outputs:

  • pipeline_out (CONDITIONING_PIPELINE)

Behavior notes:

  • Creates a new pipeline if pipeline_in is not connected.
  • Appends a new regional entry when pipeline_in is connected.
  • Keeps entries ordered so you can build predictable regional stacks.
  • Lower area strengths often improve overall image quality, but reduce per-area control authority.
  • Balance area strength together with global_strength and the LoRA strength in Create Hook Lora.

Common mistakes:

  • Supplying pixel coordinates instead of normalized 0.0-1.0 values.
  • Setting width/height near 0 and expecting visible effect.
  • Forgetting to pass the final pipeline into Conditioning Pipeline (Combine).

Conditioning Pipeline (Combine)

Combine global positive/negative conditioning with the area pipeline for region-aware outputs. Together with Set Area, this is the core path for multi-LoRAs and separate conditionings per subject/zone.

At a glance:

  • Converts your regional pipeline into final positive/negative outputs.
  • Keeps global prompt context while adding local regional control.

Inputs:

  • global_positive (CONDITIONING, required)
  • global_negative (CONDITIONING, required)
  • pipeline (CONDITIONING_PIPELINE, required)
  • global_strength (FLOAT, default 0.3)

Outputs:

  • positive_out (CONDITIONING)
  • negative_out (CONDITIONING)
  • areas_out (CONDITIONING_AREAS)

areas_out details:

areas_out exposes the list of configured area regions as a structured data output. Each entry contains the normalized coordinates (x, y, width, height) and strength that were defined in the pipeline via Conditioning Pipeline (Set Area). Connect areas_out to ComfyUI-OpenPose-Studio to automatically mirror your conditioning areas into the OpenPose editor β€” pose placement will align with the exact regions you conditioned. This output can also be consumed by any other extension or node that accepts area metadata for mask generation or region-aware downstream processing.

Behavior notes:

  • If the pipeline is empty/invalid, outputs fall back to the global inputs and areas_out is an empty list.
  • Applies regional entries, then a default combine pass for uncovered regions.
  • global_strength controls how strongly global context competes with local areas.
  • Pushing global_strength too high can reduce per-area conditioning influence and negatively impact image quality.
  • Good results generally come from balancing global strength with per-area strength and LoRA strength rather than maximizing all values.

Common mistakes:

  • Feeding only one conditioning stream instead of both positive and negative.
  • Overdriving global_strength and washing out area detail.
  • Building area entries but forgetting to connect the combined outputs to your sampler path.

ScheduledLoRALoader

Apply one LoRA with constant strength or a scheduled curve over diffusion progress, in one clean node.

At a glance:

  • Replaces messy chains of multiple native LoRA/control nodes.
  • Keeps timing, interpolation, and preview together.
  • Cleaner graph wiring for temporal LoRA behavior.

Inputs:

  • model (MODEL, required)
  • clip (CLIP, required)
  • lora_name (STRING, required)
  • strength_start, strength_end (FLOAT)
  • interpolation (STRING: linear, ease_in, ease_out, ease_in_out)
  • start_percent, end_percent (FLOAT, 0.0-1.0)
  • keyframes_count (INT, default 4)
  • apply_to_conds (BOOLEAN, optional)

Outputs:

  • model (MODEL)
  • clip (CLIP)
  • curve_preview (IMAGE)

Behavior notes:

  • If lora_name is None, model/clip pass through and preview still renders.
  • If start and end strengths match, it behaves like a constant LoRA application.
  • Curve preview helps quickly verify timing before full renders.

Common mistakes:

  • Forgetting matplotlib when using curve_preview.
  • Using a schedule window that does not match sampler timing intent.
  • Expecting this node to directly output CONDITIONING.

Optional Dependencies

Install only what you need, in the same Python environment used by ComfyUI.

  • ScheduledLoRALoader curve preview: python -m pip install matplotlib

Multi-area example workflow

Full workflow

You can drag & drop this workflow image into ComfyUI to import/load the full graph.

Area 1 setup

Area 1 conditioning

  • Use native Create Hook Lora to load one LoRA and define the area prompt/conditioning for Area 1.
  • Connect that conditioning into Conditioning Pipeline (Set Area) and set width, height, x, y, and strength for that region.

Area 2 setup

Area 2 conditioning

  • Repeat the exact same pattern: another Create Hook Lora + another Conditioning Pipeline (Set Area).
  • You can keep repeating this pattern for additional areas.

Pipeline chaining and combine

Conditioning combine

  • Chain pipeline_out from Area 1 into Area 2 (concatenated pipeline entries).
  • Send pipeline_out from the last area into Conditioning Pipeline (Combine), which merges the area pipeline with global conditioning.
  • Route combined output into KSampler directly, or into ControlNet; in this example, it is routed into ControlNet.

OpenPose / ControlNet guidance

  • OpenPose/ControlNet is optional in general, but for this specific multi-subject, multi-area composition workflow it is highly recommended for consistent composition.
  • See comfyui-openpose-studio from the same author (newer repository).

Global Styler Pipeline placement

Global Styler Pipeline placement with area conditioning + ControlNet

Global styling means applying Styler Pipeline once to the whole image, in addition to (or instead of) per-area conditioning.

  • General rule: connect Styler Pipeline before KSampler.
  • When using ControlNet, Styler Pipeline can be connected either before applying ControlNet or after applying ControlNet.
  • In practice, the result is usually equivalent, so choose whichever placement is more convenient in your graph.

global_strength tradeoffs

  • Increasing global_strength too much reduces the relative influence of per-area conditionings and can weaken LoRA/style identity per area.
  • Higher global strength can also negatively impact image quality.
  • Keep global_strength low and keep the global prompt minimal/general.
  • Rule of thumb: use values below 0.5 in general (tested up to 0.5) and avoid relying on global conditioning beyond general guidance.
  • Lowering LoRA strength tends to reduce LoRA identity or character fidelity, while lowering area strength tends to reduce per-area control.
  • It is not recommended to max everything, because high combined strengths can sacrifice image quality. This is especially true when mixing LoRAs from different authors, which can produce inconsistent quality.
  • Rule of thumb for multi-character LoRAs: when possible, use LoRAs from the same author or similar training approach for more consistent combined results.

Gallery

Preview Description
conditioning_pipeline_area Conditioning Pipeline β€” Multi Areas with ControlNet OpenPose

Demonstrates multi vertical areas with multiple LoRAs without LoRA bleeding, using ControlNet OpenPose.

Requires comfyui-openpose-studio.
conditioning_pipeline_styled Conditioning Pipeline β€” Multi Areas with ControlNet & Styling

Demonstrates multi areas and multiple LoRAs with per-area styling applied to each region independently.

Requires comfyui-openpose-studio and comfyui-styler-pipeline.

This workflow uses per-area styling, meaning each area has its own styles configured separately. Global styling is also possible by connecting the Styler node right before ControlNet.

See this post for a complete workflow combining multiple conditioning areas, OpenPose, ControlNet and Styler all used together.


Funding & Support

Why Your Support Matters

This plugin is developed and maintained independently, with regular use of paid AI agents to speed up debugging, testing, and quality-of-life improvements. If you find it useful, financial support helps keep development moving steadily.

Your contribution helps:

  • Fund AI tooling for faster fixes and new features
  • Cover ongoing maintenance and compatibility work across ComfyUI updates
  • Prevent development slowdowns when usage limits are reached

Tip

Not donating? A GitHub star ⭐ still helps a lot by improving visibility and helping more users

πŸ’™ Support This Project

PayPal

PayPal Badge

Open PayPal

USDC (Arbitrum only ⚠️)

USDC Badge

Show address

Prefer scanning? Show QR codes
Ko-fi
Ko-fi QR Code
PayPal
PayPal QR Code
USDC (Arbitrum) ⚠️
USDC (Arbitrum) QR Code

Show USDC address
0xe36a336fC6cc9Daae657b4A380dA492AB9601e73

[!WARNING] Send USDC on Arbitrum One only. Transfers sent on any other network will not arrive and may be permanently lost.

License

MIT License - see LICENSE for full text.


Maintained by: andreszs Status: Active Development

About

Area-based LoRA scheduling and area conditioning wrappers for ComfyUI.

Resources

Stars

20 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages