[BDE] Phase 1: engine-level KV cache management for DreamZero (RFC #4366) (#4534)

This commit is contained in:
Zhou Taichang authored and GitHub committed 2026-07-05 07:17:58 +08:00
1 parent aa21412c01
commit 86bdcaf3d5
27 files changed
+3795 -172

No files matched your search

+16 -1
View File
@@ -613,6 +613,20 @@ class OmniDiffusionConfig:
distributed_executor_backend: str = "mp"
nccl_port: int | None = None
# Engine backend selection, resolved by ``DiffusionEngine.resolve_engine_class``
# (mirrors ``DiffusionExecutor.get_class``). Config files use a string:
# "default" -> DiffusionEngine, or an import path (set e.g. by a deploy
# config). Programmatic callers may pass a DiffusionEngine subclass
# directly — hence ``str | type`` (structured-config mirrors should expose
# the string form only).
engine_backend: str | type = "default"
# Optional override for the diffusion model runner class (import path).
# Precedence in the worker: this override > the runner declared by the
# selected engine class (``default_diffusion_model_runner_cls``) > the
# platform default. Never mutated by engines.
diffusion_model_runner_cls: str | None = None
# HuggingFace specific parameters
trust_remote_code: bool = False
revision: str | None = None
@@ -1173,7 +1187,8 @@ class OmniDiffusionConfig:
valid_fields = {f.name for f in fields(cls)}
filtered_kwargs = {k: v for k, v in kwargs.items() if k in valid_fields}
return cls(**filtered_kwargs)
instance = cls(**filtered_kwargs)
return instance
@dataclass