diff --git a/studio/backend/core/inference/video.py b/studio/backend/core/inference/video.py index 79d19c9306..9c15c3c9f0 100644 --- a/studio/backend/core/inference/video.py +++ b/studio/backend/core/inference/video.py @@ -120,9 +120,7 @@ def _is_trusted_video_repo(repo_id: str) -> bool: def _detect_load_family( - repo_id: str, - gguf_filename: Optional[str], - family_override: Optional[str], + repo_id: str, gguf_filename: Optional[str], family_override: Optional[str] ) -> Optional[VideoFamily]: """Family detection shared by validate_load_request and the load worker: the repo id first, then the picked filename -- a local directory or generically @@ -660,9 +658,7 @@ class VideoBackend: mib_per_gb = 1000.0**3 / (1024.0 * 1024.0) if kind == "pipeline": model_dense_mib = ( - int(sum(components) * mib_per_gb * dtype_scale) - if components is not None - else None + int(sum(components) * mib_per_gb * dtype_scale) if components is not None else None ) companion_mib = None else: diff --git a/studio/backend/core/training/diffusion_train_common.py b/studio/backend/core/training/diffusion_train_common.py index 30b6ec727a..bdf53d5b6b 100644 --- a/studio/backend/core/training/diffusion_train_common.py +++ b/studio/backend/core/training/diffusion_train_common.py @@ -597,7 +597,7 @@ def _plan_cache_variants( # fallback. Over this budget the default falls back to per-step VAE encoding. A fixed # constant (rather than a psutil RAM fraction) keeps the gate dependency-free and identical # across hosts; it is deliberately conservative, well under a typical training host's RAM. -_LATENT_CACHE_BUDGET_BYTES = 4 * 1024 ** 3 # 4 GiB +_LATENT_CACHE_BUDGET_BYTES = 4 * 1024**3 # 4 GiB # Returned by the cache builders when the estimated cache exceeds the budget: the caller # keeps the VAE resident and encodes each step's latents in-loop. A distinct sentinel from @@ -614,7 +614,9 @@ def _latent_cache_forced() -> bool: def _latent_cache_over_budget( - per_variant_bytes: int, total_variants: int, budget_bytes: Optional[int] = None + per_variant_bytes: int, + total_variants: int, + budget_bytes: Optional[int] = None, ) -> bool: """True when a cache of ``total_variants`` entries, each two fp32 tensors totalling ``per_variant_bytes``, is estimated to exceed ``budget_bytes``. ``per_variant_bytes`` is