ComfyUI Node
K2 Spatial Tuning
Tuning for the K2 spatial attention router. Optional — K2 Compose uses these same defaults when nothing is connected. inside_strength binds regional text harder to its box. outside_penalty raises center-to-edge contrast and hard-blocks subject text outside its box. late_step_scale relaxes the binding in the last denoising steps so edges do not look pasted on.
K2 Spatial Tuning
- tuning
◄spatial_enabledtrue►
◄strict_isolationtrue►
◄inside_strength1.00►
◄outside_penalty1.00►
◄falloff_pixels128►
◄late_step_scale0.35►
◄subject_competitiontrue►
◄subject_filltrue►
◄spatial_instructionstrue►
◄lora_delta_adaptationfalse►
◄lora_adaptation_gain0.35►
◄fuse_global_lorastrue►
CategoryFVM Tools/K2
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| spatial_enabled | BOOLEAN | true | Off disables the router completely. Not allowed while a regional LoRA is active — its text delta would become shared scene conditioning. |
| strict_isolation | BOOLEAN | true | Hard partition: subject-owned text tokens are private to their subject and unreachable for image tokens outside its box. Off = soft bias only (attributes can bleed between subjects). |
| inside_strength | FLOAT | 1.000.05–10 | Positive attention bias inside each region. Larger values bind regional text harder to its box; very large values can flatten the image. |
| outside_penalty | FLOAT | 1.000–10 | Background regions use one quarter of this value. |
| falloff_pixels | FLOAT | 1280–2048 | Soft edge width beyond a background box. Subject text stays hard-confined. |
| late_step_scale | FLOAT | 0.350–1 | Fraction of spatial strength kept at the last step. Relaxation starts after 55% progress. Needs K2 Sampler. |
| subject_competition | BOOLEAN | true | Overlapping subjects share tokens by squared field strength instead of both claiming them fully (prevents merged people). |
| subject_fill | BOOLEAN | true | Keeps the field strong towards box edges so subjects fill their area. |
| spatial_instructions | BOOLEAN | true | Adds the generated location sentences to the prompt. Off = attention-only routing (shorter prompt, weaker placement). |
| lora_delta_adaptation | BOOLEAN | false | Rebalances each region's spatial scale from the observed regional LoRA delta energy. Needs K2 Sampler. |
| lora_adaptation_gain | FLOAT | 0.350–1 | Maximum correction gain for LoRA-delta adaptation. 0 measures without correcting. |
| fuse_global_loras | BOOLEAN | true | Global LoRAs as normal fused patches (faster). Off routes them through the same unfused path as regional LoRAs. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tuning | K2_TUNING | — |