-
Notifications
You must be signed in to change notification settings - Fork 63
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
Added a very simple GUI using Kivy. #35
base: main
Are you sure you want to change the base?
Conversation
Need to implement a callback for the GUI in the generate.py file.
driving by as a user/contributor, deferring to @filipstrand here's my take:
and users would opt into the extra deps by iff @filipstrand considers opinionated frontends as something worth including in this repo, then I can see something like:
and gui code to be isolated into zooming out though, IMO best practice is to create a separate |
I have only briefly used some frontend image-generation applications myself so my knowledge here is pretty limited, but as far as I have heard Gradio is pretty popular as @anthonywu pointed out. If I remember correctly the official Flux repo had some kind of Streamlit support, but I could not get that repo fully working so I never got to try it out. Initially I thought it would be nice to support various frontends for MFLUX, but time is very limited and up until now - and for more weeks to come - it will be spent on building out the backend and core-logic. With this in mind I agree with Anthony and would promote the idea of an external repo/project focused on building a really nice frontend with |
I plan to do a separate repo called After that, I am considering a Marimo interactive notebook experience that should be competitive with Gradio in terms of usability as a web-app. Marimo has a way of defining its own dependencies within the notebook file, read here: https://simonwillison.net/2024/Sep/17/serializing-package-requirements-in-marimo-notebooks/ - one of the better emerging frontend experiences. As for gradio support within the official mflux repo - I can see that as a fair addition, but definitely an optional dependency via |
Totally understand your points, it should be better on separate repos. |
@@ -103,6 +103,9 @@ def generate_image(self, seed: int, prompt: str, config: Config = Config()) -> I | |||
|
|||
# Evaluate to enable progress tracking | |||
mx.eval(latents) | |||
# Call the progress callback if provided | |||
if progress_callback: | |||
progress_callback(t + 1, config.num_inference_steps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is worth implementing as an interface for all GUIs to hook into. Another consideration can expect progress_callback
callable to return a bool
to indicate Continue (True
) or Abort (False
) so that the UI can stop generate_image
.
Should be easy to re-cut a branch from newest main
and just implement this.
@filipstrand - I nominate this PR to be closed due to its stale state and also precedence of related projects hosting in their own repos. |
A very simple GUI written in Kivy with a local prompt history function
Need to implement a callback for the GUI in the generate.py file.