• Stefy Lanza (nextime / spora )'s avatar
    longcat: block-sparse attention needs a geometry it can tile (v0.2.73) · 6541f265
    Stefy Lanza (nextime / spora ) authored
    Turning bsa on produced a bare AssertionError out of the first denoising step:
    
        File ".../block_sparse_attention/bsa_interface.py", line 639
          assert Tq % tq == 0 and Hq % hq == 0 and Wq % wq == 0
    
    flash_attn_bsa_3d tiles the latent into 3D chunks and needs it to divide evenly on
    every axis. With the checkpoint's shipped chunk of (4, 4, 4) that means sides
    divisible by 64 — the VAE's 16-pixel latent cell times 4 — and a latent depth
    divisible by 4, which puts num_frames at 13, 29, 45, 61, 77, 93 … and NOT at the
    step*k+1 the 4n+1 generation rule would suggest.
    
    Upstream's own default 480x832 fails it (480/16 = 30), which is presumably why
    the flag ships off: nothing in that AssertionError mentions geometry.
    
    bsa_problems() now says which axis is wrong and what to try instead, with the
    chunk read from the checkpoint's bsa_params rather than assumed. The service
    checks it per pass and, when the shape cannot be tiled, runs dense attention for
    that pass and logs why: turning the flag on in a config must not break requests
    that already work, and a silent fallback would leave someone wondering why
    nothing got faster. The flag is restored afterwards, so the next request with a
    tileable shape still gets it.
    
    The suggestion arithmetic was wrong first time round — it offered 33, which is
    exactly the frame count that fails — and the test that checks every suggestion is
    itself tileable is what caught it.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_0185zEBiy3KWB37xNGSrxL7w
    6541f265
Name
Last commit
Last update
..
test_admin_auth.py Loading commit data...
test_admin_remote_ui.py Loading commit data...
test_audio_ml_backends.py Loading commit data...
test_audio_ml_endpoints.py Loading commit data...
test_broker_config.py Loading commit data...
test_broker_dispatch.py Loading commit data...
test_broker_protocol.py Loading commit data...
test_broker_streaming.py Loading commit data...
test_burst_placement.py Loading commit data...
test_character_studio_fetch.py Loading commit data...
test_compose.py Loading commit data...
test_front_ocr_swap_gate.py Loading commit data...
test_image_has_c_compiler.py Loading commit data...
test_longcat_avatar_layout.py Loading commit data...
test_longcat_bsa.py Loading commit data...
test_longcat_cancellable.py Loading commit data...
test_longcat_checkpoint_resolve.py Loading commit data...
test_longcat_config_ui.py Loading commit data...
test_longcat_external_training.py Loading commit data...
test_longcat_int8_load.py Loading commit data...
test_longcat_lora.py Loading commit data...
test_longcat_orchestration.py Loading commit data...
test_longcat_packaging.py Loading commit data...
test_longcat_placement.py Loading commit data...
test_longcat_quantize.py Loading commit data...
test_longcat_scale.py Loading commit data...
test_longcat_tasks.py Loading commit data...
test_longcat_variants.py Loading commit data...
test_longcat_vendored_source.py Loading commit data...
test_longcat_venv_env.py Loading commit data...
test_longcat_vram_estimate.py Loading commit data...
test_longcat_worker.py Loading commit data...
test_manual_multimodal_test_client.py Loading commit data...
test_model_scan_cache.py Loading commit data...
test_ocr_olmocr.py Loading commit data...
test_ocr_vram_share_and_fallback.py Loading commit data...
test_remote_execution.py Loading commit data...
test_runpod_ocr_remotization.py Loading commit data...
test_studio_composed_surfaces.py Loading commit data...
test_township_api_key.py Loading commit data...
test_township_longcat.py Loading commit data...
test_township_page_js.py Loading commit data...
test_township_templates.py Loading commit data...
test_township_video_dataset.py Loading commit data...
test_upgrade_launcher.py Loading commit data...
test_vllm_share_self_tuning.py Loading commit data...
test_vram_releasers.py Loading commit data...
test_weight_stores.py Loading commit data...
test_whisper_server_local_models.py Loading commit data...