RunAnywhere.images generates an image from a prompt.
Options
Watching it appear
WithreportPartials on, the stream emits intermediate images, so you can show the picture
resolving rather than a spinner.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Generate images on-device
RunAnywhere.images generates an image from a prompt.
val result = RunAnywhere.images.generate(
"A lighthouse at dusk, oil painting",
ImageOptions(
negativePrompt = "blurry, text, watermark",
width = 512,
height = 512,
steps = 20,
seed = 42
)
)
| Field | Default | Meaning |
|---|---|---|
negativePrompt | none | What to avoid |
width | model default | Output width |
height | model default | Output height |
steps | model default | 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 |
reportPartials on, the stream emits intermediate images, so you can show the picture
resolving rather than a spinner.
RunAnywhere.images.generateStream(
"A lighthouse at dusk",
ImageOptions(steps = 20, reportPartials = true)
).collect { event ->
when (event) {
is ImageEvent.Partial -> preview = event.image
is ImageEvent.Completed -> final = event.result
else -> {}
}
}
val capabilities = RunAnywhere.capabilities()