Skip to content
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

Use gradio api in flux dev #2738

Merged
merged 1 commit into from
Feb 21, 2025
Merged

Use gradio api in flux dev #2738

merged 1 commit into from
Feb 21, 2025

Conversation

hlohaus
Copy link
Collaborator

@hlohaus hlohaus commented Feb 21, 2025

No description provided.

@hlohaus hlohaus merged commit ba2e6eb into xtekky:main Feb 21, 2025
1 check passed
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review for Pull Request: Use gradio api in flux dev

Thank you, H Lohaus, for contributing to the project! Your changes to integrate the Gradio API into the Flux development environment are appreciated.

Summary of Changes

  • Updated the BlackForestLabsFlux1Dev class to use a new method for handling API requests.
  • Introduced a run class method to manage both POST and GET requests to the Gradio API.
  • Enhanced the create_async_generator method to handle responses more effectively, including progress updates and error handling.
  • Added a referer attribute to maintain consistency in API requests.

Code Review

Positive Aspects

  • The introduction of the run method improves code organization and reusability.
  • The handling of different message types in the response stream is well-implemented, allowing for better user feedback during processing.
  • The use of uuid for session management is a good practice for ensuring unique identifiers.

Suggestions for Improvement

  • Consider adding docstrings to the new methods to improve code documentation and make it easier for future developers to understand the purpose and usage.
  • It might be beneficial to include some unit tests for the new functionality to ensure that the integration works as expected and to prevent regressions in the future.

Overall, the changes look solid and align well with the project's goals. Thank you again for your contribution, and I look forward to seeing this merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant