mirror of
https://github.com/Anil-matcha/Open-Generative-AI.git
synced 2026-05-07 01:17:18 +00:00
Closes #69 The Vite/Electron studio already exposed a 1–4 "Batch Count" slider but the value was only tracked in state and never applied to the request, so every generation returned a single image regardless of the slider. This wires the slider up and adds the same capability to the Next.js studio. Vite/Electron (src/components/ImageStudio.js): - Run the generation in N parallel slots when batchCount > 1 (clamped 1..4) - Each slot tracks its own request_id via savePendingJob/removePendingJob so pending-job resume and error handling stay per-image - When a fixed seed is set, offset it per slot (seed + i) so the batch yields distinct variations; a -1 seed stays random per call - Replace the single resultImg with a dynamic image container that renders one image full-size or a 2-col grid for 2–4 images - Grid tiles are clickable to expand to full size; Download button now targets the currently selected url - Partial failure is non-fatal — surface any successful results and log the rest; only throw if every slot failed Next.js studio (packages/studio/src/components/ImageStudio.jsx): - Add a batchCount state (persisted alongside the other studio prefs) - Add a compact "x1/x2/x3/x4" batch-size dropdown to the control row - Refactor handleGenerate to fan out N calls with Promise.allSettled, push each successful result into history, and keep the existing error UX when all calls fail The muapi /v1 endpoints don't expose a server-side batch parameter, so the fan-out happens client-side — one request per image. |
||
|---|---|---|
| .. | ||
| studio | ||
| workflow-ui@58cc9b22f3 | ||