• Stefy Lanza (nextime / spora )'s avatar
    Graceful Wan t2v/i2v fallback on mode-vs-model mismatch · 9494d1bd
    Stefy Lanza (nextime / spora ) authored
    The pipeline class is selected from the request mode, which can disagree with
    the model's real capability (transformer input channels), causing a hard
    channel-mismatch crash. Detect and degrade gracefully for Wan:
    
    - ti2v/i2v request on a t2v model (transformer in_channels=16): rebuild as a
      plain WanPipeline and run t2v with the keyframe dropped.
    - t2v request on an i2v model (in_channels=36): rebuild as
      WanImageToVideoPipeline (image_encoder/processor are optional) and seed a
      neutral gray frame so the prompt still drives the clip.
    
    Both rebuild a sibling pipeline reusing the SAME components, so fused
    acceleration and per-request LoRAs on the shared transformer carry over with no
    reload; the view is cached on the pipe so repeated clips reuse it and
    _sync_video_loras' adapter dedup stays intact. Helpers: _wan_in_channels(),
    _maybe_t2v_fallback(), _maybe_i2v_fallback().
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    9494d1bd
Name
Last commit
Last update
codai Loading commit data...
docs/superpowers Loading commit data...
samples Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
CODERAI_API_DOCUMENTATION.md Loading commit data...
CoderAI.gif Loading commit data...
LICENSE.md Loading commit data...
MULTIMODAL_CAPABILITIES.md Loading commit data...
MULTIMODAL_UI_EXAMPLES.md Loading commit data...
README.md Loading commit data...
build.ps1 Loading commit data...
build.sh Loading commit data...
coderai Loading commit data...
coderai-broker-implementation-reference.md Loading commit data...
coderai-integration.md Loading commit data...
osxbuild.sh Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...
todo.md Loading commit data...