• Stefy Lanza (nextime / spora )'s avatar
    video: render the identity keyframe in-process to avoid a GPU-swap deadlock · 0620e2db
    Stefy Lanza (nextime / spora ) authored
    The keyframe bridge dispatched its nested image request back through the front
    via execute_api_request. That deadlocks: by the time the engine handler runs, the
    front's GPU-swap gate has already made the VIDEO model the GPU owner for this
    request, so the nested request for a different (image) model queues behind the
    very request that is blocked waiting for it. Observed on a real Wan run:
    
      [gpu-swap] queued 'stabilityai/stable-diffusion-xl-base-1.0'
                 behind owner 'wan-ai/wan2.2-i2v-a14b-diffusers'
    
    with the GPU sitting at 0% until the request was killed.
    
    Call codai.api.images.create_image_generation directly instead. The engine
    already holds the GPU for this request, and its own model manager handles the
    load/evict — which is also what we want, since the keyframe must be rendered
    before the video weights land.
    
    Verified end to end on real hardware (Wan2.2-I2V-A14B, 4-bit, model-CPU-offload):
    t2v request + character_profiles -> "rendering IP-Adapter keyframe" ->
    "IP-Adapter loaded" + 72 modules aligned to bf16 -> keyframe in 10 steps ->
    "running ti2v from it" -> Wan loaded (24.45 GB VRAM measured) -> HTTP 200 in
    1642s with a real 480x480 h264 video, 17 frames, 2.125s, motion present between
    first and last frame.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01R6iugoNeEgt9PkajKrFyq4
    0620e2db
Name
Last commit
Last update
..
__init__.py Loading commit data...
_film_net.py Loading commit data...
_rife_ifnet.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...
canary_worker.py Loading commit data...
characters.py Loading commit data...
colibri_worker.py Loading commit data...
crisperwhisper_worker.py Loading commit data...
custom_pipelines.py Loading commit data...
diarization.py Loading commit data...
ds4_kv_janitor.py Loading commit data...
ds4_worker.py Loading commit data...
embeddings.py Loading commit data...
environments.py Loading commit data...
faceswap.py Loading commit data...
fastlog.py Loading commit data...
hub_compat.py Loading commit data...
images.py Loading commit data...
k3_worker.py Loading commit data...
kt_worker.py Loading commit data...
lipsync.py Loading commit data...
log.py Loading commit data...
loras.py Loading commit data...
ocr.py Loading commit data...
parler_worker.py Loading commit data...
pipelines.py Loading commit data...
prompt_cache.py Loading commit data...
pyannote_worker.py Loading commit data...
ratelimit.py Loading commit data...
rerank.py Loading commit data...
runpod_client.py Loading commit data...
runpod_ledger.py Loading commit data...
runpod_worker.py Loading commit data...
spatial.py Loading commit data...
speaker_embeddings.py Loading commit data...
speaker_registry.py Loading commit data...
state.py Loading commit data...
stt_backends.py Loading commit data...
text.py Loading commit data...
transcriptions.py Loading commit data...
tts.py Loading commit data...
tts_backends.py Loading commit data...
urlutils.py Loading commit data...
video.py Loading commit data...
vllm_worker.py Loading commit data...
voice_clone.py Loading commit data...
voice_convert.py Loading commit data...
vpr_salad_server.py Loading commit data...