Open-Generative-AI/packages
Abraar77 dc0a552297 feat(image-studio): implement batch generation (1–4 images per click)
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.
2026-04-22 16:33:24 +05:30
..
studio feat(image-studio): implement batch generation (1–4 images per click) 2026-04-22 16:33:24 +05:30
workflow-ui@58cc9b22f3 feat: implement workflow identity persistence, unify api auth, and upgrade tailwind to v4 2026-04-21 19:38:34 +05:30