ComfyUI Node
kubakub region sampler
Run a region plan on an image, region by region. inpaint: the region is cut out with context, scaled uniformly to about region_mp on the model grid, inpainted with its own prompt and the crop as reference, colour matched and pasted back. frame_in_frame: the region gets its own scene generated from scratch, placed through its mask, and its border is harmonized. Later regions see earlier ones. Flux 2 Klein and Qwen Image 2.1 are detected automatically. Results are kept in RAM across queues: a region whose crop pixels, masks, prompt, seed, settings and models are unchanged is pasted from the cache, so changing one prompt re-samples only that region (and later regions whose crops overlap it).
kubakub region sampler
- model
- clip
- vae
- plan
- image
- style
- image
- changed
- report
◄steps0►
◄cfg0.0►
◄sampler_nameeuler►
◄schedulersimple►
◄region_mp1.00►
◄max_upscale4.00►
◄scheduleauto►
◄seed_offset0►
◄adapterauto►
◄only►
Categorykubakub/2d/generate
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The image model (Flux 2 Klein, Qwen Image 2.1 or a generic model), with any LoRAs already applied. | |
| clip | CLIP | The text encoder that matches the model. | |
| vae | VAE | The VAE that matches the model. | |
| plan | KUBA_PLAN | From kubakub region plan. | |
| image | IMAGE | The canvas, exactly the size of the regions (e.g. the 3840x2160 facade render or photo). | |
| steps | INT | 00–200 | Used where the plan says steps = 0. 0 = the model's default (Klein 4, Qwen Image 2.1 25). |
| cfg | FLOAT | 0.00–30 | Used where the plan says cfg = 0. 0 = the model's default (1.0). |
| sampler_name | COMBO | euler | Sampler for every region (euler is a safe default). |
| scheduler | COMBO | simple | Generic models only; Flux 2 always uses its own schedule (core Flux2Scheduler for the crop size). |
| region_mp | FLOAT | 1.000.1–4 | Work megapixels per region crop (region + context), and the size of frame_in_frame scenes. Small regions are scaled up to this, large ones down. |
| max_upscale | FLOAT | 4.001–8 | Small regions are scaled up at most this much. |
| schedule | COMBO | auto | auto: steps / sampler / scheduler as set. qwen21_turbo_5: the 5 trained steps of the Viggle Qwen-Image-2.1 turbo LoRA (load it with LoraLoaderModelOnly); pruna_qwen21_8: the 8 trained steps of the Pruna Qwen-Image-2.1 LoRA (strength 1.0). Partial denoise starts at the matching step, steps is ignored. Sampler as set (euler, or res_2s / deis_2m for more detail). |
| seed_offset | INT | 00–4294967295 | Added to every region seed, for a new variation of all regions. |
| adapter | COMBO | auto | Model family; auto detects Flux 2 and Qwen Image 2.1. |
| onlyopt | STRING | Process only the regions matching these selectors (plan syntax: space = AND, comma = OR). Empty = all. | |
| styleopt | IMAGE | A style image for the regions whose plan says reference = style: the model sees it as a second reference next to the region's own crop (scaled to about 1 megapixel). Of a batch the first image is used. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The image with all processed regions pasted in. |
| changed | MASK | Where pixels were replaced (paste alpha). |
| report | STRING | Model, cache use, time, and one line per region (status, crop box and scale). |