fix(combinatorial): Fix inflated image counts and duplicate generation#875
Open
Adios wants to merge 1 commit into
Open
fix(combinatorial): Fix inflated image counts and duplicate generation#875Adios wants to merge 1 commit into
Adios wants to merge 1 commit into
Conversation
This commit fixes a critical bug in the combinatorial generation feature where the underlying library produced an inflated number of prompts and a malformed list structure. The issues addressed are: 1. **Count Inflation:** The prompt count was incorrectly calculated as `Combinations * Batches^2`, causing the generation of significantly more images than requested. 2. **Identical Duplicates:** The prompt list was structured as `[P1, P1, P2, P2]`. When combined with the extension's seeding logic (which generates seeds as `[S, S, S+1, S+1]`), this resulted in identical `(P1, S)` and `(P1, S)` pairs. This patch adds logic to intercept the generated prompt list, trim it to the correct length (`Combinations * Batches`), and reorder it to `[P1, P2, P1, P2]`. This ensures that every generated image is a unique combination of prompt and seed, and matches the expected output count.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit fixes a critical bug in the combinatorial generation feature where the underlying library produced an inflated number of prompts and a malformed list structure.
The issues addressed are:
Combinations * Batches^2, causing the generation of significantly more images than requested.[P1, P1, P2, P2]. When combined with the extension's seeding logic (which generates seeds as[S, S, S+1, S+1]), this resulted in identical(P1, S)and(P1, S)pairs.This patch adds logic to intercept the generated prompt list, trim it to the correct length (
Combinations * Batches), and reorder it to[P1, P2, P1, P2]. This ensures that every generated image is a unique combination of prompt and seed, and matches the expected output count.