AI – Flux Klein 2 – Inpainting
presentation
Flux 2 provides superior precision for image creation, particularly when the process involves transformation, integration, or composition. Being free and open-source, it stands as a compelling alternative to Nano banana.
In architecture, certain functionalities are invaluable for rapidly transforming concepts into visual representations.
Detailed explanations on Flux2 can be found here : https://docs.comfy.org/tutorials/flux/flux-2-klein
Unlike a standard VAE, this approach utilizes novel nodes: an Inpaint crop acting as a ‘spying glass’ and the Flux Enhancer node, which is instrumental in preventing the model from generating hallucinations.
Case Study 1 – replace
it uses Flux2-Klein-2-image-inpainting.json
We change the road material
starting image

inpainting the area that will be transformed

prompt

Magnitude to 10

result
it perfectly fit the geometry, light and perspective
note that in that case I bypassed the second image nodes

for a better result a reference can be given.
I want to put the cobblestones from street 2 to street 1

Prompt

the prompt does all the magic. If it does not work, the prompt is bad.
All links are reactivate

result
it’s a perfect blend.
Case study 2 – modify
it uses Flux2-Klein-2-image-inpainting.json
This is the most complex case, we have an iconic building from Le Corbusier, we want to renovate, repaint, this is easy, but also remove the shade which is along the building. The removal process is pretty hard to achieve in a single move. Usually we should erase it and then modify the image.

We give a reference, inpaint

the prompt that does all

here’s a perfect result
Effectively painting the facades with varying colors proved challenging. After numerous attempts, it was determined that the appropriate approach was not to categorize them by terms like « main facade, » « side facade, » or « long facade. »

but west facade and north facade for instance

result
Case study 3 – furnituring
it uses Flux2-Klein-inpaint-two-image-1.json
There I want to add existing furniture in an empty room


the sofa has to fit in the right place, right scale, right orientation
prompt

result
Now we want to add multiple references in this room

we need add nodes
it’s a cascading process


result
everything is perfectly where it should be
Case study 4 – replacing buildings
This part is harder than expected. Using Flux2-Klein-2-image-inpainting.json it is possible to place a building in an existing photograph. But depending on the focal length or composition, we can expect difficulties.
site

building

prompt

result
When it is in a street and it has to perfectly match the perspective, it is a bit more tricky.
For accurate integration, the characteristics of the base image must be known. Additionally, the second image should ideally share a similar perspective with the first; otherwise, the process may not function correctly.

scene to work with. We want to replace the two buildings at the corner.
prompt

result
the normalized strength has been changed

Other methodology
From image to 3D

Sketchup Camera match

import

match position and camera

result
Case study 5 – relighting
A global relighting could resolve the noticeable remnants of the collage in the final result.
In the mask editor we cover nearly everything

prompt


result

the image is more balanced
some characters are slightly deformed (like a video game)

to preserve them switch to linear

back to normal

Thanks to
https://aistudynow.com/flux-2-0-klein-advanced-inpainting-download-workflow/











