Nova Canvas Guide: Image Generation and prompt set up - vertesia/llumiverse GitHub Wiki

This guide covers the different modes available in Amazon Nova Canvas and how to structure prompts for each mode.

Common Options

Available for most modes:

  • width and height: Dimensions of generated images
  • quality: Either "standard" or "premium"
  • cfgScale: Controls how closely the model follows the prompt
  • seed: For reproducible results
  • numberOfImages: Number of images to generate

Available Modes

1. TEXT_IMAGE (Default)

Basic text-to-image generation without reference images.

Prompt Structure:

  • user: Detailed description of the desired image
  • negative: Elements to avoid in the image

2. TEXT_IMAGE_WITH_IMAGE_CONDITIONING

Generate images based on text while using a reference image for conditioning or control.

Prompt Structure:

  • user: Description of the desired image + reference image attachment
  • negative (optional): Elements to avoid in the image

Options:

  • controlMode: Use "CANNY_EDGE" for edge detection or "SEGMENTATION" for object segmentation
  • controlStrength: How strongly the conditioning image affects generation (higher values preserve more of the original structure)

3. COLOR_GUIDED_GENERATION

Create images with specific color palettes.

Prompt Structure:

  • user: Description of the desired image
  • negative (optional): Elements to avoid in the image

Options:

  • colors: Array of hex color values that should appear in the image
  • Reference image can be included to provide additional guidance

4. IMAGE_VARIATION

Generate variations of existing images.

Prompt Structure:

  • user: Description of desired modifications + image attachment(s)
  • negative: Elements to avoid in the variations

Options:

  • similarityStrength: How closely the variations should match the original images (higher values create more similar images)

5. BACKGROUND_REMOVAL

Remove backgrounds from images, creating transparent PNGs.

Prompt Structure:

  • user: Image attachment
  • No text prompt required for this mode

6. INPAINTING

Inpainting allows you to selectively replace or modify parts of an image while keeping the rest intact. This is useful for removing unwanted elements, adding new objects, or changing specific areas of an image.

Prompt Structure:

  • user: Description of what to add to the masked area + two image attachments:
    1. Source image (the original image to be modified)
    2. Mask image (white areas indicate regions to be modified, black areas remain unchanged)
  • negative (optional): Elements to avoid in the generated inpainted area

7. OUTPAINTING

Outpainting extends an existing image beyond its original boundaries, allowing you to expand the canvas in any direction while maintaining visual consistency with the original image.

Prompt Structure:

  • user: Description of what to generate in the extended area + two image attachments:
    1. Source image (the original image to be expanded)
    2. Mask image (white areas indicate regions to be generated, black areas remain unchanged)
  • negative (optional): Elements to avoid in the generated outpainted area

Note: Both inpainting and outpainting require two images - the source image and a mask image. The mask image should have black areas indicating where to apply changes and white areas indicating what to preserve.