Commit Graph
7 Commits
Author SHA1 Message Date
ausboss 9abead5a78 Krea 2 Encode: show AnyPaint the new area in the picture's own colour
A dark or colourful picture padded with the #808080 gray came back from
Krea 2 AnyPaint with the gray still there: a gray frame around the picture,
or gray corners on a turned one. AnyPaint was trained with the new area of
its reference filled with the median colour of the picture, so a gray patch
next to a dark photo reads to it as part of the scene and it paints it back.
It did the same with every Krea 2 model file tried.

Krea 2 Encode gets an optional mask input, appended last. When it is wired,
the new area of the reference (mask above 0.5) is refilled with the median
colour of the rest before it reaches the VAE and the vision tower. The
canvas the rest of the graph uses keeps its gray. Without the link nothing
changes.
2026-09-29 16:50:26 -05:00
ausboss f34169a132 Update the Krea 2 Outpaint example
Replace it with the version that pads with Image Crop + Rotate + Pad,
with its sample picture and a new thumbnail. Point the README's Load
Image + Pad section at Klein 9B Outpaint, and update the example table,
the outpaint caption, the Krea 2 Outpaint Model Patch help page and the
CHANGELOG. Raise the Registry archive budget to 18 MB.
2026-09-29 02:06:08 -05:00
ausboss 750f1e4860 Krea 2 Outpaint docs: drop the inpaint claim, fix Crop For Inpaint
The example's Workflow Note and the Krea 2 Outpaint Model Patch help page
said you could paint over part of the picture with the mask editor and pad
at the same time. Load Image + Pad drops the picture's alpha, its mask
covers only the new padding, and it hides the core preview the mask editor
opens from, so that never worked. Both now say the workflow only extends
the picture outward.

The help page also said a Crop For Inpaint stitcher places the reference
over the full frame. On source rectangle it falls back to where the crop
sat in the full picture, so the page now says to use whole canvas with one.
2026-09-28 15:20:15 -05:00
ausboss 32b18d01f4 Name the Krea 2 patch output model, as the node does 2026-09-24 00:46:14 -05:00
ausboss 699208dadc Prepare 2.0.0 release candidate 2026-09-07 19:56:23 -05:00
ausboss 8e2775da74 Warn when an outpaint is padded on both axes
The extended region breaking up is not a tuning problem. The model
places the source spanning one whole canvas axis - pad left/right and it
spans the full height, pad top/bottom and it spans the full width - and
the reference pipeline this LoRA ships with splits anything else into
TWO passes rather than doing it in one. Padding both axes and running
once puts the placement outside what the weights were trained on.

Verified on one image, one seed, changing only the geometry: padded left
AND bottom, the dress is cut off flat and the legs below it are mush;
padded bottom only, the gown continues full length with no seam.

Load Image + Pad happily pads any combination of sides, so this is easy
to hit by accident - and the usual cause is not a deliberate second pad.
Padding only the bottom of a 720-wide source at canvas_multiple 32 rounds
the width up to 832, and an 11px sliver breaks the span exactly as
completely as a deliberate 231px pad. The warning therefore reports the
spare pixels on each axis and names the multiple, instead of just saying
the placement is wrong.
2026-08-17 22:49:18 -05:00
ausboss ec50d3acfe Promote the Krea 2 outpaint pair from the lab
Krea 2 accepts reference latents, but they arrive with no position, so the
model treats them as a loose style hint: it borrows the look and reinvents
the content. That is the whole reason an outpaint drifts instead of
continuing the photo.

Krea 2 Encode attaches the reference latents and emits the negative from
the same node, so a turbo graph at CFG 1.0 stops carrying a second text
encode that does nothing. Krea 2 Outpaint Model Patch registers those
reference tokens into the target grid at the rectangle the stitcher
records, on frame axis 1.

Load Image + Pad gained a `reference` output - the unpadded source, fitted
to a 384px long edge and a multiple of 16, because the VAE downsamples by
8 and the DiT patchifies by 2. It is APPENDED after `stitcher`, never
inserted: a workflow stores links by output slot index, so any other
position silently rewires every saved graph.

The stitcher now records where the source sits, as source_bbox in pixels
and bbox_normalized in 0..1. Padding knows the rectangle exactly, so it
rides with the canvas instead of a parallel wire that can be left
unplugged. apply_stitch reads neither key, so an older stitcher stitches
identically.

Ported from the lab rather than copied: the lab's _krea2_helpers had its
own pad_image, feather_pad_mask, plan_pad_canvas, parse_fill_color and
build_canvas_stitcher. Duplicating the padding engine here would let the
outpaint path and the inpaint path disagree about what a stitcher is, so
the public module keeps only what is specific to Krea 2 and uses the
existing helpers for the rest.

Two departures from the lab version. The model patch declared a kv_cache
input and never read it - the cache was always on - so it is wired up now.
And it imports comfy's flux internals when you run it rather than at
startup: a core release that moves one then surfaces as an error on that
node, instead of deleting it from the menu and leaving saved workflows
reporting it missing.
2026-08-17 22:17:19 -05:00