-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FLUX.1 Tools | Fill #129
base: main
Are you sure you want to change the base?
FLUX.1 Tools | Fill #129
Conversation
Happy to see you take this on. I've wondered how to support this without either of:
I think this workflow could use another "tool" where the project demos how to do the mask (maybe even fork code from diffusers) but isn't officially packaged in the library. |
My proposal for the obvious outpaint mode follow-up, probably separate PR. (no guarantee I have time to help but just dropping thoughts)
where outpaint args can be these variants following CSS padding convention:
I considered this but want to not scope it in:
requires the user to do even more mental math on the size of the output image, I think any wrappers or GUIs can provide that functionality by calculating the absolute or relative padding unlike inpainting, I like that outpointing does not require a separate mask image, it can be inferred from the padding numbers |
@anthonywu True, I was thinking the along the same lines with a tool that could generate the mask... For the upcoming release I think it's fine to only ship the bare-bones and assume the user already has obtained the mask from somewhere else and add a helper tool for later. Regarding your suggestion for expressing the padding options, I think an interface like that would be a nice fit! I am also debating a bit with how integrated this feature should be with other ones, e.g if we should have separate "pipelines" like in diffusers (as we have done with A bit longer term, but there are some cool 3rd party models/techniques that makes impressive use of in-painting and the in-context ability like catvton flux that would also be nice to support. I have been looking into this a bit briefly but still some work left to get this up and running. |
I have attempted a merge against the latest git remote add aw [email protected]:anthonywu/mflux.git
git fetch aw
# from your inpaint branch here
git reset --hard aw/inpaint-0.7.0 if you make progress after this I'll rebase on your canonical work in this upstream repo |
Awesome, thanks for handling the conflicts and cleanup! |
Uses black-forest-labs/FLUX.1-Fill-dev as base model
A bit related to #127 in the sense that the left hand side image is "masked-out" (but in that PR there is no official concept of a mask) and will not be altered by the denoising process. Will try to investigate if/how these can be unified...
Update: It is possible to achieve "in context learning" using an appropriate mask like so:

However, this requires the dev-fill model and initial results are worse compared to the the approach in #127, (maybe because the adapters were trained with the dev-weights as base...?)
Probably best to keep #127 as a separate feature for now...