Denoising steps; more is slower and usually better
guidanceScale
model default
How closely to follow the prompt
seed
random
Fix it to reproduce an image
mode
generate
Generate or inpaint
reportPartials
false
Emit intermediate images while streaming
Watching it appear
With reportPartials on, the stream emits intermediate images, so you can show the picture
resolving rather than a spinner.
for await (const event of RunAnywhere.images.generateStream('A lighthouse at dusk', { steps: 20, reportPartials: true,})) { if (event.type === 'partial') showPreview(event.image) if (event.type === 'completed') showFinal(event.result)}
Reproducing an image
Fix the seed and every other option, and the same prompt produces the same image. Without a
fixed seed, it will not.
Cost
Image generation is the heaviest thing in the SDK. A 512×512 image at 20 steps takes far longer
than a text completion and warms the device noticeably. Run one at a time, show progress, allow
cancellation, and do not put it on a timer.