Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1b4a66d
Video inference engine: LTX-2 family registry, VideoBackend, MP4 gallery
danielhanchen Jul 4, 2026
e24df85
Video HTTP surface: /api/inference/video routes + request/response mo…
danielhanchen Jul 4, 2026
b58098b
LTX-2.3 checkpoint support: full pipeline assembly
danielhanchen Jul 4, 2026
9c2107e
Refuse scaled fp8 LTX single files with a pointer to GGUF
danielhanchen Jul 4, 2026
17be3b1
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 4, 2026
9dbe4a4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 4, 2026
3ead020
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 4, 2026
562c719
Add video_router to the desktop auth main-import stub
danielhanchen Jul 4, 2026
eefa85c
Stub routes.preview in the desktop auth test so main imports order-in…
danielhanchen Jul 4, 2026
07ceada
Bind video_router in the routes re-export tuple for the import-hoist …
danielhanchen Jul 4, 2026
dfeb043
Baseline huggingface-hub 1.22.0 sandbox and retry-loop scanner findings
danielhanchen Jul 4, 2026
3c91c60
Reset FBCache state on the video DiTs before each generation
danielhanchen Jul 4, 2026
baf6a3c
Fix video load planning, lifecycle, and trust gaps from review
danielhanchen Jul 5, 2026
4d97574
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
fbcf1ad
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 5, 2026
add623d
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
92207a3
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
d442e00
Scope the video base repo download to the files the pipeline loads
danielhanchen Jul 5, 2026
f7fdb4e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 5, 2026
e2fd907
Shrink the LTX-2.3 base pull to the components the assembly reads
danielhanchen Jul 5, 2026
69f48d2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 5, 2026
1a41408
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
7ccac9c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 5, 2026
9debe8a
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
ef6f18c
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
a274308
Check the cancel event between predownload files and probe local dirs…
danielhanchen Jul 5, 2026
de2cddc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 5, 2026
14f4e7e
Keep standalone chat templates in the scoped video download
danielhanchen Jul 5, 2026
cab6039
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
5ae91a0
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
6485e68
Harden video load path: early GGUF-repo rejection, family fallback pa…
danielhanchen Jul 5, 2026
e023511
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
34ca1d7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 5, 2026
891ca35
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
84bbc9d
Merge branch 'diffusion-more-families' into video-inference
danielhanchen Jul 5, 2026
225b899
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 5, 2026
9862ccc
Merge remote-tracking branch 'origin/diffusion-more-families' into vi…
danielhanchen Jul 5, 2026
609e0f4
Merge remote-tracking branch 'origin/diffusion-more-families' into vi…
danielhanchen Jul 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions scripts/scan_packages_baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,22 @@
"evidence": "FS: L528: history: list[Response] | None = None, sha256:f56272dccd651b2644aa41ef6e688e211462427aad07fef5150240ec7347446e\nNetwork: L9: import urllib.request | L1243: class _CookieCompatRequest(urllib.request.Request):",
"evidence_hash": "b32f79e58c938680d89efa74113eeba76c9fc5aedf5de18086f93bef274c4bda"
},
{
"package": "huggingface-hub",
"file": "huggingface_hub/_sandbox.py",
"check": "C2 polling/beaconing loop detected",
"severity": "CRITICAL",
"evidence": "L1179: while True: sha256:33ceddf9e42aae207e891e97808c518e92a0b27ab60e4326256717bfb25a3a38",
"evidence_hash": "802fd41d8bb17bf425e99d128c0351c820103a5efb74690a4086e542a71437b8"
},
{
"package": "huggingface-hub",
"file": "huggingface_hub/_sandbox.py",
"check": "Writes to /tmp and executes (staged dropper)",
"severity": "CRITICAL",
"evidence": "L83: d=/tmp/.sbx-server\nL84: if command -v wget >/dev/null 2>&1; then wget -q --header \"Authorization: Bearer $SBX_DL_TOKEN\" -O \"$d\" \"$SBX_SERVER_URL\"\nL85: elif command -v curl >/dev/null 2>&1; then curl -fsSL -H \"Authorization: Bearer $SBX_DL_TOKEN\" -o \"$d\" \"$SBX_SERVER_URL\"\nL86: else cp \"$SBX_SERVER_MOUNT/sbx-server\" \"$d\"; fi\nL87: chmod +x \"$d\"",
"evidence_hash": "6908a3fe328fa94ee22a119998d6ad07cfa1ba4efa2628acf240f4204fd76e22"
},
{
"package": "huggingface-hub",
"file": "huggingface_hub/hf_api.py",
Expand All @@ -242,6 +258,14 @@
"evidence": "L4600: while True: sha256:f4a851312a1832efe1b435aa1275a82184e19cc3f47e2cd244373d56c11de272",
"evidence_hash": "dc8fcf44788e32f42d1cc2eb0e2deb55eb2dbf2c3a55909a7d503e450f45e602"
},
{
"package": "huggingface-hub",
"file": "huggingface_hub/hf_api.py",
"check": "C2 polling/beaconing loop detected",
"severity": "CRITICAL",
"evidence": "L4613: while True: sha256:f764b6ca3118b23c7c0e670e77178c022a6905f825d7df6e528545fa10aae8f6",
"evidence_hash": "9c85d50c227285fa8dc69512999cbb082258cda4b299c7d0e0f69f5aff7accd4"
},
{
"package": "huggingface-hub",
"file": "huggingface_hub/hf_api.py",
Expand All @@ -266,6 +290,14 @@
"evidence": "L298: while True: sha256:6b8e5e569594caf7c4eca6137646dae471a7c3aae7294096cf876f30b5f90306",
"evidence_hash": "c066cc27bce31ee7b6ce07411ee7a7d9ecfbf3aafc8848f6641fabfe522a7703"
},
{
"package": "huggingface-hub",
"file": "huggingface_hub/utils/_http.py",
"check": "C2 polling/beaconing loop detected",
"severity": "CRITICAL",
"evidence": "L462: while True: sha256:c75d1ee228cf7703a8c28551d649395a1f89f69a3aba69413f5bbcbd10c31958",
"evidence_hash": "d4d5f83fed39b87898cf776d5dad0bf1a6388a932f5fb7997d1070b50e46213e"
},
{
"package": "ipython",
"file": "IPython/core/debugger.py",
Expand Down
20 changes: 20 additions & 0 deletions studio/backend/core/inference/diffusion_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,26 @@ def estimate_image_runtime_mib(
return max(1024, int(8192 * max(0.25, pixel_scale) * multiplier))


def estimate_video_runtime_mib(
*, width: Optional[int], height: Optional[int], num_frames: Optional[int]
) -> int:
"""Per-call activation / latent / decode headroom for a video generation.

The image estimator is pixel-area only and badly undershoots video: latents
carry a frames dimension and the VAE DECODE is the peak -- the decoded clip
materialises as num_frames full-resolution fp32 frames plus the decoder's
intermediates, typically dwarfing the denoise activations. Scale by the
decoded-clip footprint (frames x H x W x 3 x 4 bytes) with a 3x factor for
decoder intermediates + the PIL/tensor copy held during export, on top of a
fixed denoise-side base.
"""
w = max(64, int(width or 768))
h = max(64, int(height or 512))
frames = max(1, int(num_frames or 121))
decoded_mib = (frames * w * h * 3 * 4) / float(1024 * 1024)
return max(3072, int(4096 + 3.0 * decoded_mib))


def _safe_device_budget_mib(memory: DeviceMemory) -> Optional[int]:
"""Free memory minus a headroom reserve, so a plan that "fits" leaves room for
fragmentation and other tenants. None when free memory is unknown."""
Expand Down
13 changes: 11 additions & 2 deletions studio/backend/core/inference/gpu_arbiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

CHAT = "chat"
DIFFUSION = "diffusion"
VIDEO = "video"

_lock = threading.Lock()
_owner: Optional[str] = None
Expand Down Expand Up @@ -61,8 +62,16 @@ def _evict_diffusion() -> None:
get_active_diffusion_engine().unload()


# Patchable in tests via monkeypatch.setitem.
_EVICTORS = {CHAT: _evict_chat, DIFFUSION: _evict_diffusion}
def _evict_video() -> None:
from core.inference.video import get_video_backend
get_video_backend().unload()


# Patchable in tests via monkeypatch.setitem. Ownership is exclusive -- only one
# owner holds the GPU at a time -- so acquire_for's evict-the-current-owner
# already generalises to any number of registered owners (chat / image / video
# all evict whichever of the others currently holds the GPU).
_EVICTORS = {CHAT: _evict_chat, DIFFUSION: _evict_diffusion, VIDEO: _evict_video}


def acquire_for(owner: str) -> None:
Expand Down
Loading
Loading