Skip to content

KV cache tensor dimension mismatch in DenoiseBlock/RecacheFramesBlock when target size is zero #500

@livepeer-robot

Description

@livepeer-robot

Summary

The LongLive pipeline's DenoiseBlock and RecacheFramesBlock encounter tensor dimension mismatches when the KV cache expansion target has zero tokens in one dimension.

Error Details

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

DenoiseBlock errors (11 occurrences):

Error in block: (denoise, DenoiseBlock)
Error details: The expanded size of the tensor (0) must match the existing size (4680) at non-singleton dimension 1. Target sizes: [1, 0, 12, 128]. Tensor sizes: [4680, 12, 128]

RecacheFramesBlock errors (2 occurrences):

Error in block: (recache_frames, RecacheFramesBlock)
Error details: The expanded size of the tensor (0) must match the existing size (18720) at non-singleton dimension 1. Target sizes: [1, 0, 12, 128]. Tensor sizes: [18720, 12, 128]

Analysis

  • Target size [1, 0, 12, 128] has 0 tokens in dimension 1
  • Existing tensor has 4680 or 18720 tokens (ratio 4x suggests 4 latent chunks)
  • The 12 and 128 dimensions appear to be local_attn_size=12 and head dimension
  • This suggests the KV cache is being expanded with an invalid/empty token count

Possible Causes

  1. Edge case when current_start_frame == 0 but cache isn't properly initialized
  2. Race condition between cache initialization and block execution
  3. Invalid frame sequence length calculation when resolution parameters are incorrect

Environment

  • Pipeline: LongLive (modular blocks)
  • Blocks affected: DenoiseBlock, RecacheFramesBlock
  • Timestamp: 2026-02-20 07:39-07:40 UTC (cluster of errors from same session)

Logs

All errors originated from app_id d93e99fb-c6d3-4e48-aff2-be59eb51ad5f.

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