Dimensions: Output size and aspect ratio
How width and height shape composition, which outputs accept them, and the architecture limits that decide safe values.
Introduction
The width and height parameters define the canvas size of your generated media. Beyond resolution, these values determine the aspect ratio, which directly influences composition, framing, and how the model distributes visual elements across the output.
Image and video models both take them. Audio and 3D models have no canvas to size, so neither parameter exists there.
Aspect ratios
The ratio between width and height shapes how the model composes the scene:
- Square (1:1), 1024 × 1024: General-purpose. Works well for portraits, product shots, and social media.
- Portrait (taller than wide), 768 × 1024, 832 × 1216: Better results for character portraits and full-body shots. The vertical space encourages the model to compose along a vertical axis.
- Landscape (wider than tall), 1024 × 768, 1216 × 832: Ideal for scenic views, environments, and panoramic compositions.
- Ultra-wide, 1536 × 640, 1792 × 512: For banners, cinematic shots, and panoramas.

A floating island with waterfalls spilling into the sky, surrounded by colorful clouds and giant birds, under a vibrant sunset, ultra-wide cinematic shot
The model adapts its composition to fill the canvas. A landscape prompt in a portrait frame will stack elements vertically, while the same prompt in landscape will spread them horizontally. Choosing the right ratio before generating is often more effective than cropping afterwards.
Request structure
Width and height are passed at the top level of your generation request. The multiple each architecture accepts varies, so check the limits below before picking a size.
import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: '<image-model-air>',
positivePrompt: 'A modern open-plan office with long desks and tall windows',
width: 1216,
height: 832,
steps: 30
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "<image-model-air>",
"positivePrompt": "A modern open-plan office with long desks and tall windows",
"width": 1216,
"height": 832,
"steps": 30
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "imageInference",
"taskUUID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"model": "<image-model-air>",
"positivePrompt": "A modern open-plan office with long desks and tall windows",
"width": 1216,
"height": 832,
"steps": 30
}
]'runware run "<image-model-air>" \
positivePrompt="A modern open-plan office with long desks and tall windows" \
width=1216 \
height=832 \
steps=30{
"taskType": "imageInference",
"taskUUID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"model": "<image-model-air>",
"positivePrompt": "A modern open-plan office with long desks and tall windows",
"width": 1216,
"height": 832,
"steps": 30
}import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: '<video-model-air>',
positivePrompt: 'A pair of running shoes rotating slowly on a white studio turntable, the camera holds steady',
width: 1920,
height: 1080,
duration: 6
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "<video-model-air>",
"positivePrompt": "A pair of running shoes rotating slowly on a white studio turntable, the camera holds steady",
"width": 1920,
"height": 1080,
"duration": 6
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "videoInference",
"taskUUID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"model": "<video-model-air>",
"positivePrompt": "A pair of running shoes rotating slowly on a white studio turntable, the camera holds steady",
"width": 1920,
"height": 1080,
"duration": 6
}
]'runware run "<video-model-air>" \
positivePrompt="A pair of running shoes rotating slowly on a white studio turntable, the camera holds steady" \
width=1920 \
height=1080 \
duration=6{
"taskType": "videoInference",
"taskUUID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"model": "<video-model-air>",
"positivePrompt": "A pair of running shoes rotating slowly on a white studio turntable, the camera holds steady",
"width": 1920,
"height": 1080,
"duration": 6
}When the input sets the size
Starting a video from a still changes who decides. The frame you pass in already has a width and a height, and the model builds the clip around them. Some models reject width and height outright in that case, so a request that works for a text prompt fails once you add the image.
Video models also tend to publish a short list of accepted sizes rather than a range. The same 1024 x 576 that any image model takes is refused by several video models, which is why the safe move is to read the model's API reference instead of reusing an image size.
Architecture limits
Each model architecture has specific dimension constraints. Generating within the trained resolution range produces the best results, since models learn visual patterns at specific scales.
| Architecture | Width and height | Multiple of | Notes |
|---|---|---|---|
| Krea 2 Raw | 64–2048 | 16 | |
| Krea 2 Turbo | 64–2048 | 16 | |
| Z Image | 128–2048 | 16 | Trained at 1024 x 1024. Flow-matching architecture |
| Z Image Turbo | 128–2048 | 16 | |
| Exactly Illustrative | 1024–2048 | 64 | |
| FLUX.1 [dev] | 128–2048 | 64 | Trained at 1024 x 1024. Handles a wide range of resolutions well |
| FLUX.1 [schnell] | 128–2048 | 64 | |
| Stable Diffusion XL | 128–2048 | 8 | Trained at 1024 x 1024. Good quality up to 1536 |
| Stable Diffusion XL Lightning | 128–2048 | 8 | |
| Stable Diffusion XL Turbo | 128–2048 | 8 | |
| Stable Diffusion 1.5 | 128–1024 | 8 | Trained at 512 x 512. Best quality there, and higher resolutions can produce duplicated subjects |
| Illustrious XL | 128–2048 | 8 | |
| NoobAI XL | 128–2048 | 8 | |
| Pony Diffusion XL | 128–2048 | 8 |
Generating outside a model's trained resolution can produce artifacts. SD 1.5 at 1024 × 1024 often generates duplicated or merged subjects (two heads, repeated objects). If you need higher resolution output, generate at the model's native resolution and then upscale the result.
Dimensions in image-to-image
When using image-to-image or outpainting, you can set output dimensions that differ from the source image. This forces the model to recompose the scene to fit the new canvas:
- Same aspect ratio, different size (512 × 512 → 1024 × 1024): Uniform scaling. Generally produces good results since no recomposition is needed.
- Different aspect ratio (1024 × 1024 → 1536 × 768): The model must decide how to redistribute content, potentially stretching elements or generating new content to fill the expanded dimension. Use a higher
strengthvalue (0.8+) to give the model enough freedom to recompose naturally.
For controlled expansion in a specific direction, outpainting is often a better choice than changing dimensions in image-to-image, since it preserves the original content and only generates new content in the expanded area.
Tips
- Match your model's trained resolution. Generate at 512 for SD 1.5, 1024 for SDXL and FLUX. Going outside this range is possible but costs quality.
- Generate small, upscale later. For high-resolution output, it's more efficient and higher quality to generate at native resolution and use upscaling to increase the size afterwards.
- Choose aspect ratio before generating. Cropping a square image into landscape loses content. Generating in the target ratio from the start lets the model compose for that shape.
- Use multiples of 64 for safe values. The multiple varies by architecture, from 8 to 64, so using multiples of 64 (512, 768, 1024, 1280) ensures compatibility across all models.
- Consider aspect ratio for the subject. Portraits work better in vertical frames, landscapes in horizontal. Let the content dictate the ratio rather than defaulting to square.
- Let the still decide when you animate it. If your clip starts from an image, size that image to the frame you want and leave
widthandheightout of the request.