Skip to content

VaceEncodingBlock fails on extremely narrow input images (kernel size > input size) #557

@livepeer-tessa

Description

@livepeer-tessa

Summary

The VaceEncodingBlock encounters a convolution error when processing input images that have been resized to extremely narrow dimensions (width as small as 2 pixels), which is smaller than the 3x3 convolution kernel.

Error Details

Multiple ERROR-level logs from fal.ai backend (28 Feb 2026):

Pipelines affected:

  • krea-realtime-video (majority of occurrences)
  • streamdiffusionv2

Error pattern:

Error in block: (vace_encoding, VaceEncodingBlock)
Error details: Calculated padded input size per channel: (257 x 2). Kernel size: (3 x 3). Kernel size can't be greater than actual input size

And for streamdiffusionv2:

Calculated padded input size per channel: (513 x 2). Kernel size: (3 x 3). Kernel size can't be greater than actual input size

Analysis

  • The padded input has dimensions like (257 x 2) or (513 x 2) — the width dimension is only 2 pixels
  • The 3x3 convolution kernel cannot process inputs smaller than 3 pixels in any dimension
  • The 257/513 heights suggest standard resolutions (256+1 for padding or 512+1)
  • The 2-pixel width is abnormally narrow, likely caused by:
    1. Extreme aspect ratio input images/videos
    2. Incorrect resize/crop operations upstream
    3. A bug in resolution calculation when switching aspect ratios

Suggested Fix

  1. Add input validation in VaceEncodingBlock to reject or pad inputs below minimum dimensions
  2. Add a minimum dimension check earlier in the pipeline (e.g., in input preprocessing)
  3. Consider logging a more descriptive warning when inputs are near the minimum size

Sample Timestamps (28 Feb 2026 UTC)

  • 09:14:34 - 09:14:39 (krea-realtime-video)
  • 09:17:14 (streamdiffusionv2)
  • 09:19:43 - 09:22:48 (krea-realtime-video)

Environment

  • Backend: fal.ai
  • App ID: 3564d791-2447-4a41-9ab8-53909db8c657
  • Blocks affected: VaceEncodingBlock

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions