Skip to content

fix(combinatorial): Fix inflated image counts and duplicate generation#875

Open
Adios wants to merge 1 commit into
adieyal:mainfrom
Adios:combinatorial-generation-bugs
Open

fix(combinatorial): Fix inflated image counts and duplicate generation#875
Adios wants to merge 1 commit into
adieyal:mainfrom
Adios:combinatorial-generation-bugs

Conversation

@Adios

@Adios Adios commented Dec 8, 2025

Copy link
Copy Markdown

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 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.
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