FLUX 3 Image Klein Outpaint LoRA

Extends a picture on any side, and paints the gray corners of a picture you have turned. Pad the picture with flat gray #808080, give the padded canvas to FLUX 3 Image Klein as the reference, and the LoRA fills the gray with more of the scene while keeping your picture where it is.

Ready-made ComfyUI workflow: FLUX 3 Image Klein Outpaint on Civitai, also in this repo as workflows/flux-3-image-klein-outpaint.json. This LoRA on Civitai: FLUX 3 Image Klein Outpaint LoRA. Also for FLUX 3 Klein: Single & Multi-Image Edit. Videos on YouTube @ausbossdev.

New video: I threw a ton of edits at Qwen Image 2.1, FLUX 3 Klein and FIBO 2

padded input | no LoRA | with the LoRA

Rendered with the workflow in this repo: FLUX 3 Image Klein distilled INT8, 16 steps, CFG 1, the same auto-caption prompt and seed in both columns, the original pasted back with Stitch Inpaint. Only the LoRA is switched. Each row: padded input | no LoRA | with the LoRA at 1.5. The amber boxes mark what goes wrong without the LoRA: FLUX 3 shifts the scene, so the pasted-back original ends up next to a faded copy of itself.

turned input | no LoRA | with the LoRA

The same for a picture turned 8 degrees with Image Crop + Rotate + Pad and padded on both sides: without the LoRA a tuft of hair sticks up above her head and the edge of the turned picture shows.

Use it on the distilled model, at strength 1.5, with gray #808080 and the instruction below. 1.0 works too, but slips more often when you add a lot. I trained it on the base model and tested it on the distilled one (16 steps, CFG 1). Other fills and prompts are untested.

Without the LoRA, FLUX 3 Image Klein often zooms in on the picture or slides it instead of extending it. In my test it did that in 36 of 40 runs. With the LoRA, the original part of the picture moved by 0.1 to 1.5 px on six pictures it was not trained on. On 16 more test pictures it stayed within 2 px on 15 at strength 1.5, and on 12 at 1.0.

More results with the LoRA:

A woman in a green jacket on a rainy subway platform. Left: the picture with gray added on both sides. Right: the platform and the train continue on both sides and she has not moved

A woman resting her head on a car window at night. Left: the picture turned 8 degrees, with gray corners. Right: the corners are painted with more of the car and the street

Pictures the LoRA was not trained on, made with the workflow in this repo with the LoRA at 1.0: INT8 files, 16 steps, CFG 1, about 8 seconds each on an RTX 5090. Left is what the model is given, right is the result with the original pixels pasted back by Stitch Inpaint. Neither picture is in the training set.

Prompt

The instruction is the trigger. Put it first:

Outpaint the image: replace the solid gray areas with a seamless continuation of the scene, keeping the existing picture unchanged.

Optionally follow it with Scene: <description>. The training captions described the whole picture, so describe what is in the picture you are extending. In ComfyUI, Text Generate with FLUX 3's own text encoder (Qwen3-VL 4B) can write the description from the picture. For that, load the encoder a second time as type krea2. As type flux3 it returned an empty text in my tests.

Files

file notes
flux-3-image-klein-outpaint.safetensors The LoRA. Step 1,000 of a 2,000-step run, rank 32, 161 MB. Loads onto the FLUX 3 Image Klein files in ComfyUI, INT8 or BF16.
workflows/flux-3-image-klein-outpaint.json The ComfyUI workflow: pad or turn the picture, write the prompt, paint, paste the original back.
LICENSE.md, NOTICE.txt The FLUX Kommunity License and the notice it asks for. See License.

ComfyUI

You need ComfyUI 0.41 or newer, which is the first version with FLUX 3, and AusBoss nodes 2.13.0 or newer. In ComfyUI-Manager, search "AusBoss". The FLUX 3 Image Klein files are on Hugging Face behind a license click: black-forest-labs/flux-3-image-klein-comfy. The workflow uses the INT8 files and names the full-size ones as an option.

To build it yourself:

  1. Pad the picture with flat gray #808080 (AusBoss Image Crop + Rotate + Pad: fill #808080, feather 0, 1 MP, steps 32). To straighten a crooked picture, turn it with the same node and let it paint the corners.
  2. CLIP Text Encode with the prompt above, and Conditioning Zero Out for the negative.
  3. Set Reference Multi Latent: the padded picture as the reference, resolution keep resolution.
  4. KSampler on the latent that Set Reference Multi Latent returns: 16 steps, CFG 1, euler / simple, denoise 1. The LoRA goes on the distilled model at strength 1.5.
  5. VAE Decode, then AusBoss Stitch Inpaint with the stitcher from the padding node: seam classic, Tone match 1. It puts your original pixels back on top.

There is no noise mask in this graph. Plain FLUX 3 needs one to keep the picture in place, but then the picture's brightness shifts and a box can show around it. I marked that version wrong on 5 of my 6 test pictures. With the LoRA you do not need it.

What I measured

Six pictures that are not in the training set: three padded, three turned. I cropped each from a full picture, so the real continuation is known. "Moved" is how far the original part of the picture sits from where it was, at the worst corner of the largest upright rectangle inside it. This is the raw sampler output, before the paste-back. Distilled model, 16 steps, CFG 1, one seed per picture.

picture no LoRA with the LoRA
padded on the right, 24 % 129.3 px 1.5 px
padded on both sides 8.0 px 1.4 px
padded on the left and the top 192.8 px 0.7 px
turned 8° 40.4 px 0.4 px
turned -6°, band on the right 22.8 px 0.1 px
turned -11° 38.0 px 0.3 px

Without the LoRA the picture is scaled or slides: the left-and-top picture came out 17 % bigger. With it, the picture stays where it was and the new area continues it. I looked at all six at full size and they looked right.

Plain FLUX 3 Image Klein, in a separate test with the official template graph (4 pictures, 5 kinds of fill, 2 kinds of prompt, 40 runs), kept the picture in place within 8 px in 4 runs. In the other 36 it moved by 15 to 180 px.

Strength. On 16 more pictures (padded on one to four sides, two of them turned), plain FLUX 3 kept the picture within 2 px on 6, the LoRA at 1.0 on 12 and at 1.5 on 15. The one miss at 1.5 had a big pad on top. Then I ran the workflow at 1.5 on 20 more of my pictures: I loved 13, 6 were OK and 1 was wrong. The workflow uses 1.5.

Colour. FLUX 3 Image Klein shifts the colours of the whole picture a little, with or without the LoRA, mostly towards red: up to about 10 of 255 on my test pictures. Pasting the original back removes that from the part you kept. Its mean colour was within 0.6 of 255 of the original on all six. With Tone match 1 and the classic seam, the new area also follows the tone of your picture. On the car window picture the colour step at the seam went from 2.4 to 1.4, against pasting back without Tone match.

Which step. I saved a checkpoint every 250 steps and compared steps 750, 1,000 and 1,500 on the same six pictures. I liked step 1,000 on all six, step 750 on five and step 1,500 on one. Step 1,000 is the file here.

INT8 or BF16. On three of the test pictures I ran both. The picture stays in place with both, and INT8 took about half the time: 5 to 6 seconds against 11.

Limits

  • It was trained with your picture covering 45 to 93 % of the canvas. For a bigger extension, run it again on the result.
  • It was trained on canvases of 0.94 to 1.96 MP, and I tested about 1 MP. Larger canvases are untested.
  • I tested it on the distilled model only, not on the base model's 50 steps.
  • It does not make the picture bigger or sharper.
  • Not every run is clean. In 18 trial runs, one drew part of the picture a second time (a big pad above a busy picture that was also turned) and one left a lighter patch of ceiling at the seam. At 1.5, one of the 20 went wrong: with 40 % added under a sitting person, she was drawn a little lower and the paste-back showed her knees twice. Run it again with another seed.

How it was made

This video explains how I trained it: youtube.com/watch?v=5YN7ywxS4I8. It's about the Qwen Image 2.1 version, but I used the same technique for this one, and the workflow in the video is basically the same one too.

  • ostris/ai-toolkit, arch: flux3, on FLUX 3 Image Klein Base in BF16 without quantization. Rank 32, alpha 32, AdamW 8-bit, learning rate 1e-4 constant, batch 1, 2,000 steps with a checkpoint every 250, resolution 1408 buckets, caption dropout 0, no flips, shift timesteps.
  • 102 pairs. The target is the real photo and the source is the same photo with the area to paint filled with #808080. Everything else is identical.
    • 68 outpaint pairs: the pictures and captions of my Qwen Image 2.1 Outpaint LoRA v2. One side, opposite sides, a corner, three sides or a frame, with the original covering 45 to 93 % of the canvas.
    • 34 turned pairs from the same pictures: a rectangle of the photo turned by 2.4 to 14.8°, 14 one way and 20 the other, so the corners are gray. 12 have only the corners, 22 also have bands on the sides. The original covers 50 to 88 % of the canvas.
  • Captions: the instruction above, or a paraphrase of it, and for 77 of the 102 Scene: and a description of the picture.
  • Pictures, by pair: 81 Unsplash photos under the Unsplash License via unsplash-lite, 3 museum pictures from PD12M (public domain or CC0), 3 anime pictures from anime-with-caption-cc0 (CC0), and 15 from my own collection.

License

This LoRA is a modified version of FLUX 3 Image Klein: an adapter I trained on FLUX 3 Image Klein Base. It is shared under the FLUX Kommunity License v.1.0, the same license as the base model, and I added no terms of my own. The rights to use FLUX 3 Image Klein and this adapter come to you directly from Black Forest Labs under that license. Whether you may use the pictures you make commercially depends on section 2 of it, so read it first.

Black Forest Labs did not make, endorse or approve this adapter. It is provided as is, with no warranty and no liability, as in sections 5 and 6 of the license.

The notice the license asks for, which is also in NOTICE.txt:

This FLUX Model is licensed by Black Forest Labs Inc. under the FLUX Kommunity License. Copyright Black Forest Labs Inc. IN NO EVENT SHALL BLACK FOREST LABS INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH USE OF THIS MODEL.

I changed the FLUX Model: this file is a LoRA adapter trained by ausboss.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ausboss/FLUX-3-Image-Klein-Outpaint-LoRA

Adapter
(28)
this model

Space using ausboss/FLUX-3-Image-Klein-Outpaint-LoRA 1