vllm_omni.diffusion.models.dreamzero.state_dreamzero ¶
DreamZero pipeline persistent state.
DreamZeroState ¶
Pipeline persistent state across forward() calls.
Lifecycle
- Created once in DreamZeroPipeline.init()
- Mutated every forward() call (frame append, KV cache grow)
- reset() on new session / language change / local_attn_size exceeded
accumulate_frames ¶
Accumulate stitched frames and return multi-frame video.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stitched | ndarray | (H, W, C) single frame or (T, H, W, C) multi-frame, already stitched by transform. | required |
Returns:
| Type | Description |
|---|---|
ndarray | (T, H, W, C) ndarray. T=1 for first call, T=FRAMES_PER_CHUNK(4) after. |
create_kv_caches ¶
create_kv_caches(
batch_size: int,
dtype: dtype,
device: device,
num_layers: int,
num_heads: int,
head_dim: int,
) -> None
Initialize empty KV caches and cross-attention caches.
get_crossattn_caches ¶
Get cross-attention caches for the specified branch.
get_kv_caches ¶
Get KV caches for the specified branch.
should_reset ¶
Determine if state should be reset before this forward().