Skip to content

Add Flux.2 Klein Inpaint pipeline #13005

Closed

Description

@Natans8

The currently implemented Flux2KleinPipeline supports txt2img and img2img, however there isn't an option to pass a mask image to it.

A Flux2KleinInpaintPipeline would be most useful to address this case and allow to use the model to its full extent.

Activity

  1. ansonphong commented on Jan 23, 2026

    @ansonphong

    Yes having masked inpainting is critical for my application. There is no way to implement Flux2 in my app without this feature. Please add it, thanks!

  2. adi776borate commented on Jan 25, 2026

    @adi776borate
    Contributor

    Hi! I’d like to take this up.
    I’ve reviewed the Flux.2 Klein pipeline and have started drafting the inpainting pipeline. For implementation details, I’ll be using FluxInpaintPipeline as my primary reference.

  3. asomoza commented on Jan 26, 2026

    @asomoza
    Member

    thanks and please go ahead, but I recommend you use src/diffusers/pipelines/flux/pipeline_flux_kontext_inpaint.py as a guide since the klein models are also edit models, if using flux inpaint works for you, that's fine too.

  4. newideas99 commented on Jan 27, 2026

    @newideas99

    How is this going guys? :)

  5. adi776borate commented on Jan 28, 2026

    @adi776borate
    Contributor

    How is this going guys? :)

    I'm on it. The normal inpainting (without reference image) is working good. There are some issues when reference image is passed.
    I'll try fixing it and open a PR or a draft PR by tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions