• Stefy Lanza (nextime / spora )'s avatar
    manager: clean cross-engine VRAM swap (evict a busy sibling at its unit boundary) · c9791579
    Stefy Lanza (nextime / spora ) authored
    On the GGUF-isolation split, a torch (video/image) engine and a gguf (text)
    engine share one NVIDIA card. When one needed VRAM it asked the co-located
    sibling to release via /internal/evict-vram, but that only evicted the
    sibling's IDLE models and SKIPPED busy ones — so a text-model load would
    proceed into the VRAM an in-flight video clip still needed for its forward,
    and BOTH OOM'd. Recovery then laddered the video load down to disk offload
    and thrashed for ~1h.
    
    Give the cross-engine path the same wait-then-evict the local eviction
    already has: release_idle_vram(needed_gb, wait_for_busy, wait_timeout) first
    evicts idle models, then — only if still short — WAITS for each busy model to
    reach a safe idle point (between requests, e.g. between video clip parts) and
    evicts it. This converts contention into a CLEAN SWAP: the render's current
    unit finishes, its model is evicted, the sibling loads alone, and the render
    reloads + resumes on its next unit. Bounded by wait_timeout (180s) so two
    mutually-waiting busy engines can't deadlock — one gives up and falls back to
    its own CPU/disk offload.
    
    /internal/evict-vram now reads needed_gb + wait + wait_timeout from the body
    and forwards them; _cosite_vram_releaser sends wait=True with an HTTP timeout
    that exceeds the sibling's wait budget so the swap isn't cut short. Symmetric:
    both engines register the releaser at each other, so either direction swaps
    cleanly.
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01RdMufYvtTbtGDWsiZVoXce
    c9791579
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...
characters.py Loading commit data...
custom_pipelines.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...
images.py Loading commit data...
log.py Loading commit data...
loras.py Loading commit data...
parler_worker.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...
tts_backends.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...