• 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
..
__init__.py Loading commit data...
app.py Loading commit data...
archive.py Loading commit data...
audio_backends.py Loading commit data...
audio_clean.py Loading commit data...
audio_gen.py Loading commit data...
audio_stems.py Loading commit data...
characters.py Loading commit data...
custom_pipelines.py Loading commit data...
embeddings.py Loading commit data...
environments.py Loading commit data...
faceswap.py Loading commit data...
images.py Loading commit data...
log.py Loading commit data...
loras.py Loading commit data...
pipelines.py Loading commit data...
prompt_cache.py Loading commit data...
ratelimit.py Loading commit data...
spatial.py Loading commit data...
state.py Loading commit data...
text.py Loading commit data...
transcriptions.py Loading commit data...
tts.py Loading commit data...
urlutils.py Loading commit data...
video.py Loading commit data...
voice_clone.py Loading commit data...
voice_convert.py Loading commit data...