-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(ui): more batch data types #7545
Conversation
My first go at the generators made them an alternative value for collection fields that was embedded in the workflow. So in the workflow, a float collection would either be a list of floats or the generator config (e.g. start, step and count). When you load a saved workflow, if the collection was set up as a generator, you'd get the generator UI instead of a list of numbers. This worked but it modified the workflow schema, which is undesirable as it increases maintenance burden, complexity and implies some amount of lock-in. I reverted those changes and made the generators a purely UI thing. The frontend logic is much simpler and the UX is similar. The only downside is that the generator isn't saved to the workflow, which was kinda nice. Overall this simpler approach feels right to me. It also makes it much easier to add more complex generators - like non-linear ranges. It also opens the door to using dynamic prompts as a generator, which is pretty cool. |
4de524d
to
b6aae16
Compare
…multiple images w/ same name in collection
Unfortunately we cannot do strict floats or ints. The batch data models don't specify the value types, it instead relies on pydantic parsing. JSON doesn't differentiate between float and int, so a float `1.0` gets parsed as `1` in python. As a result, we _must_ accept mixed floats and ints for BatchDatum.items. Tests and validation updated to handle this. Maybe we should update the BatchDatum model to have a `type` field? Then we could parse as float or int, depending on the inputs...
This reverts commit 111a29c.
This reverts commit 9da3339.
…ields" This reverts commit 41cc6f1.
b6aae16
to
8a29a11
Compare
Summary
A followup PR will add support for pairwise batching.
Supporting internal changes:
QA Instructions
Try it out!
Generator UI:
Screen.Recording.2025-01-13.at.9.06.07.pm.mov
Merge Plan
Targeting v5.6.1.
Checklist
What's New
copy (if doing a release after this PR)