Gen Grid

A batch of generations from one prompt, laid out to fit how many there are, with one to pick.

Your image will appear here

Your image will appear here

Your image will appear here

Your image will appear here

In use

The Playground's results: a run's images, one task each. Pick one to reuse its seed, edit it or animate it.

Lumen
CreateEditVideo
240 credits

Your image will appear here

Your image will appear here

Your image will appear here

Your image will appear here

16 credits

Installation

pnpm dlx shadcn@latest add https://mgp.paukraft.com/r/gen-grid.json

GenGrid

PropTypeDefault
value / defaultValuestring | null

The picked item's value, or null. Controlled with onValueChange.

null
onValueChange(value: string | null) => void

Makes revealed images pickable by click. Picking the picked one clears it.

—
columnsnumber

Defaults to fit the children: one, up to three in a row, then a square-ish grid.

—

GenGridItem

PropTypeDefault
valuestring

Identifies the item when picked.

—
…ImageGenLoaderPropsstatus, progress, src, alt, …

Everything ImageGenLoader takes; spread a loader from useBflBatch.

—

useBflBatch

FLUX makes one image per request, so a batch is one task per image, polled side by side. Takes the same poll and interval as useBflGeneration.

PropTypeDefault
generate(count, submit: (index, signal) => Promise<BflTask>) => Promise

Starts one task per image, replacing the batch in flight. Vary each by index, e.g. its seed.

—
loadersImageGenLoaderProps[]

One per image, each retrying itself on failure.

—
items / busyImageGenResult[] / boolean

Each image's state, and whether any is still in flight.

—
retry(index: number) => void

Runs one image of the batch again.

—