• 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
codai Loading commit data...
docs Loading commit data...
packaging Loading commit data...
samples Loading commit data...
tests Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
CODERAI_API_DOCUMENTATION.md Loading commit data...
CoderAI.gif Loading commit data...
DISTRIBUTION.md 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...
REQUEST-geoclip-embeddings.md Loading commit data...
REQUEST-vpr-embeddings.md Loading commit data...
amdgpu-coredump-05000.bin Loading commit data...
build-oci.sh 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...
commands Loading commit data...
osxbuild.sh Loading commit data...
package-oci.sh Loading commit data...
package-tarball.sh Loading commit data...
requirements-crisperwhisper.txt Loading commit data...
requirements-nemo.txt Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-ocr-paddle.txt Loading commit data...
requirements-ocr.txt Loading commit data...
requirements-pyannote.txt Loading commit data...
requirements-surya.txt Loading commit data...
requirements-vllm.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...
run-oci.sh Loading commit data...
smoke-test-oci.sh Loading commit data...
todo.md Loading commit data...
video_editor.config.json Loading commit data...