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

First working version of Flux Plugin. #5410

Closed
wants to merge 15 commits into from

Conversation

leondape
Copy link
Contributor

@leondape leondape commented Jan 22, 2025

This is a well working implementation of a BFL Flux tool to be used by agents.
It includes a variety of parameters and best practices for image prompts.
Credits also go to @jmaddington and his work on his fork.

  • Images are properly handled like with DallE

  • introduced an option image transaction collection in the DB to track image generation usage for flux.

  • Option to provide own API key via chat while default API key is provided via .env

  • New feature (non-breaking change which adds functionality)

  • This change requires a documentation update

Testing

Tools don't have test coverage.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes
  • A pull request for updating the documentation has been submitted.

Display of images in agent chat directly ill require some fixing, like with dallE before
…e calls.

in order to render multiple images from one call (possible on BFL/FLUX side) a change on librechat tool handling is required
…and possible future introduction of a separate image generation credit inside librechat. currently only working for flux but could be abstracted for any image generation.
…nvironments where there is a default key for everyone but a user wants to use an own key.

This could also be changed with UI but I find this also quite explicit. Ofcourse keys are then in the chats which is ugly. However I don't have a better solution right now
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

ESLint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@leondape
Copy link
Contributor Author

Agent image handling is now improved and working like with dallE.

@jmaddington
Copy link
Contributor

@leondape Thanks for picking up the work on this

bugfix: fetching flux finetune models works now
Fixed generation of finetune models
…netuned image generation support

- Introduced new 'generate_finetuned' action in schema
- Implemented generateFinetunedImage method with robust error handling
- Added validation for finetuned generation endpoints
- Enhanced logging and transaction tracking for finetuned image generation
- Improved payload construction for finetuned image requests
@marlonka
Copy link
Contributor

this would be really cool if it could make it to the repo

@danny-avila
Copy link
Owner

Thanks, the image transaction stuff should really be part of a separate PR, I may just fork this and do so...

@danny-avila
Copy link
Owner

I refactored flux without image transaction logic using the new Agent format, which was not used originally. The new format allows the LLM to actually see the image initially after the generation run for greater understanding of what was generated.

chrome_RV8AOaM3NI

The new format can effectively make any tool an image tool without needing to edit imageGenTools in data-provider.

The motivation to remove image transactions is that this can be done centrally with a standardized format, since with the new format, all images are being processed in one place, so there's no longer a need to pass processFileURL to the tool initialization

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.

4 participants