Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ ui/test-results
ui/playwright-report
dw/server/ui
dw/docs
dw/examples
workflows/*/assets
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ one to open.
| Validation registry | `dw/validation.py`: `ERROR_CHECKS`, `WARNING_CHECKS`, `run_checks` | A check is one `Check` in a registry, and a check that raises becomes one `internal` finding while the rest still run. | `tests/test_validation.py::TestExceptionPolicy::test_a_raising_check_is_one_internal_error_and_the_rest_still_run` |
| Reference limits | `dw/reference_limits.py`: `reference_limit_errors` | A reference set the pipeline would refuse is refused before the load, and the per-kind and total counts are read off `MiniMaxH3Ref2VASetupStep`'s `__init__` defaults, never written in the engine. On an H3 step a bare-string entry (`asset:`, `output:`, `previous_result:`, a path) is refused at its index too, since the setup block takes only reference objects and nothing builds one from a string. `reference_length_errors` refuses an H3 video reference shorter than the conditioner's minimum (sampling rate from `MiniMaxH3Ref2VATextEncoderStep`, rate from the pipeline, merge group from the Qwen3-VL video processor) when its length is knowable: a literal `trim_video` `num_frames`, or an `asset:`/`output:`/path file the probe reads; a variable-held length stays a run-time refusal (#1422). `reference_duration_errors` refuses an audio reference outside the `min_reference_duration`-`max_reference_duration` bound read off `PikaH3FlexRef2VASetupStep`'s `__init__` (`DURATION_LIMIT_BLOCKS`; MiniMax-H3 declares none), for a probed `asset:`/`output:`/path file or a `slice_audio` with a literal length (#1427). `reference_field_errors` refuses a key on a reference entry that is neither a field of its `reference_type` class nor a `from_file()` parameter (`start_frame` on an H3 video reference), read off the class through `dw/references.py`'s `named_from_file_parameters`/`has_field`/`no_field_message`, the one owner of which keys a reference object takes, which `dw/arguments.py` `split_from_file_arguments`/`apply_field_overrides` call too (#1428). | `tests/test_reference_limits.py` |
| Pipeline limits | `dw/pipeline_limits.py`: `pipeline_limit_errors` | Only what the pipeline would refuse is refused: a literal H3 `num_frames`, `width` or `height` outside the limits read off `MiniMaxH3ModularPipeline`. A windowed refine (`refine_windows` with `refine_strength`), or an experimental windowed generation (`experimental_hybrid_windows`), keeps the floor and loses the 15 s ceiling, by the predicate its layout step asks at the call (`h3_rules.lifts_duration_ceiling`). A diffusers that renames the class or a property makes it check nothing. | `tests/test_pipeline_limits.py` |
| H3 windowed generation (EXPERIMENTAL, #1188) | `dw/pipeline_processors/h3_window_rules.py`: `hybrid_problems`, `hybrid_settings`, `HYBRID_DEFAULTS` (the call rules and settings, beside the refine windows' plan and weights it shares); `dw/pipeline_processors/h3_windows.py`: `hybrid_refusal`, `DwH3WindowedLoopDenoiser._hybrid`, `._ordered`, `._keystone_prepass`, `DwH3HostLoopSchedulerStep`, `keystone_inputs`; the flag and pricing in `h3_rules.py` (`HYBRID_WINDOWS_ENV_VAR`, `hybrid_windows_enabled`, `hybrid_window_frames`) | `experimental_hybrid_windows` is refused - at validate (`guides.windows_errors`), at the call (`Pipeline._check_refine`) and in the loop - unless the process sets `DW_EXPERIMENTAL_HYBRID_WINDOWS=1`, and the refusal names the flag. Under it a held-audio t2va take is generated from noise in blended time windows: the take's latents live in host RAM (pinned on CUDA), each forward ships one window's rows to the device, the fused velocity is accumulated on the host and the stock update steps it there; after the last step the take returns to its device for the release and the decode. One window over the take is the stock loop bit for bit. The first `switch_step` steps are ordered (`_ordered`, at step 0): each window alone, its overlap pinned to the window before (finished frames or x0 at step k, by `handoff`) at the clean timestep, keep-first; the rest blended with window 1 held finished, and a `switch_step` past the run's denoise steps is refused at validate before the flag. `anchor: "keystone"` (S4) hands every forward but window 1's the keystone - window 1's finished first latent frame (a window-1 pre-pass, `_keystone_prepass`, when `switch_step` is 0) - as extra clean-timestep rows (`keystone_inputs`) dropped before the fuse, with the keystone re-split attention on the ordered phase's later windows only (`_ordered_attention`); `"none"` is the path above bit for bit, and any other value is refused at validate before the flag. The VRAM estimate prices one window's frames; the time estimate is left null with a reason. | `tests/test_h3_hybrid_windows.py`, `tests/test_pipeline_limits.py::TestHybridWindows::test_the_flag_off_refusal_names_the_flag` |
| H3 windowed generation (EXPERIMENTAL, #1188) | `dw/pipeline_processors/h3_window_rules.py`: `hybrid_problems`, `hybrid_settings`, `HYBRID_DEFAULTS` (the call rules and settings, beside the refine windows' plan and weights it shares); `dw/pipeline_processors/h3_windows.py`: `hybrid_refusal`, `DwH3WindowedLoopDenoiser._hybrid`, `._ordered`, `._keystone_prepass`, `._set_keystone`, `._face_cells`, `DwH3HostLoopSchedulerStep`, `keystone_inputs`; the face box on the patch grid, `h3_mask_cells.box_cells`; the flag and pricing in `h3_rules.py` (`HYBRID_WINDOWS_ENV_VAR`, `hybrid_windows_enabled`, `hybrid_window_frames`) | `experimental_hybrid_windows` is refused - at validate (`guides.windows_errors`), at the call (`Pipeline._check_refine`) and in the loop - unless the process sets `DW_EXPERIMENTAL_HYBRID_WINDOWS=1`, and the refusal names the flag. Under it a held-audio t2va take is generated from noise in blended time windows: the take's latents live in host RAM (pinned on CUDA), each forward ships one window's rows to the device, the fused velocity is accumulated on the host and the stock update steps it there; after the last step the take returns to its device for the release and the decode. One window over the take is the stock loop bit for bit. The first `switch_step` steps are ordered (`_ordered`, at step 0): each window alone, its overlap pinned to the window before (finished frames or x0 at step k, by `handoff`) at the clean timestep, keep-first; the rest blended with window 1 held finished, and a `switch_step` past the run's denoise steps is refused at validate before the flag. `anchor: "keystone"` (S4) hands every forward but window 1's the keystone - window 1's finished first latent frame (a window-1 pre-pass, `_keystone_prepass`, when `switch_step` is 0) - as extra clean-timestep rows (`keystone_inputs`) dropped before the fuse, with the keystone re-split attention on the ordered phase's later windows only (`_ordered_attention`); `"keystone_face"` (S6) is the same with only the keystone rows under her face - the first latent frame decoded alone, the pinned face_track detector's most confident box grown 1.5x onto the patch grid - spliced at their frame-0 positions, and a frame with no face fails the job naming the anchor, never the whole frame instead; `"none"` is the path above bit for bit, and any other value is refused at validate before the flag. The VRAM estimate prices one window's frames; the time estimate is left null with a reason. | `tests/test_h3_hybrid_windows.py`, `tests/test_pipeline_limits.py::TestHybridWindows::test_the_flag_off_refusal_names_the_flag` |
| Step-value checks | `dw/step_value_checks.py`: `fps_errors`, `cache_errors`, `null_media_errors`, `select_errors`, `chain_prompts_errors`, `chain_length_errors` | The only caller of these checks is the error registry. | `dw/validation.py`: `ERROR_CHECKS` |
| Command result type | `dw/scalar_result_validation.py`: `scalar_result_errors`, `unsaved_json_warnings`; a command declares it on `register_command` (`returns`, `result_content_type`) | A command's required `result` content_type (`application/json` for a json command, `result_content_type` for a fixed container such as `export_timeline`'s .otioz) is checked here from its own declaration, never by a second walk or a command-name match elsewhere. A JSON-answering task step with no `result` block and no later `previous_result:` reader (resolved by `step_cache.reference_resolves_to`) gets a validate warning, since its answer is dropped (#1366). | `tests/test_content_types.py::TestExportTimelineContentType::test_a_wellformed_but_wrong_type_is_refused_naming_otioz`; `tests/test_scalar_result_validation.py::TestUnsavedJsonWarnings::test_probe_without_result_warns` |
| Admission | `dw/server/admission.py`: `admit`, `workspace_roots` | Validate, submit, rerun and enhance load and check a request once, and `JobManager.submit` does not check it again. Every route that validates a definition for a workspace, a workflow save and patch included, does so inside `workspace_roots`, so the read confinement sees that workspace's assets and outputs (#1739). A `request`/`item` link's key shape is checked in `JobRequest` (`validate_ledger_key`, 422; `dw_mcp` only splits on the one `/`), and the ledger lookup (`dw/ledger.py: link_problem`: `unknown_request`, `request_closed`, `unknown_item`, `item_dropped`, 422) refuses it in `dw/server/routes/jobs.py: submit_job` before admission runs; a rerun's inherited link is not refused but warned (`JobManager._link_warnings`). | `tests/test_admission.py::test_a_submit_expands_once`, `tests/test_admission.py::test_a_save_reads_the_roots_of_its_own_workspace` |
Expand Down
14 changes: 14 additions & 0 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ A PyPI install gets released `diffusers`, which may lag the newest pipelines; in

GitHub generates notes from commits at tag time. The sections below are the hand-written notes: the newest is drafted at release prep and pasted into the GitHub release body once the tag has published (`gh release edit v<version> --notes-file ...`). Items a branch's author wants the next note to name go in a new section at the top.

### 0.23.1

<!-- Drafted at release prep (2026-11-28). Paste into the GitHub release body once the tag has published: gh release edit v0.23.1 --notes-file ... -->

A packaging fix for 0.23.0. The engine, server and UI are unchanged.

- **The Docker image builds again.** 0.23.0 published no image:
`scripts/build_dist.sh` listed the example catalog with git, which the
image's build stage does not have. `dkackman/diffusers-workflow:0.23.1`
and `latest` are the first images of the 0.23 line.
- The `.mcpb` packer's lockfile holds `tmp` at 0.2.7, past two path
advisories in 0.0.33. `tmp` is a build-time dependency of the packer and
is in nothing dw ships.

### 0.23.0

<!-- Drafted from v0.22.0..develop at release prep (2026-11-28), with the feat/installer branch notes folded in. Paste into the GitHub release body once the tag has published: gh release edit v0.23.0 --notes-file ... -->
Expand Down
25 changes: 25 additions & 0 deletions dw/pipeline_processors/h3_mask_cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@
(dw/pipeline_processors/h3_mask_steps.py, which `h3_mask.blocks()` imports on
first use) reads `keep_rows` from here and never imports its own importer -
the `import_cycles` ratchet in scripts/arch_metrics.py.

`box_cells` puts a pixel box on the same grid, for the windowed generation's
face-region keystone (#1188 S6, h3_windows.py).
"""

import math

import numpy as np

from ..variable_constraints import aligned, aligned_down
Expand Down Expand Up @@ -105,6 +110,26 @@ def keep_rows(mask, latent_frames, latent_height, latent_width, patch_size, grow
).reshape(-1)


def box_cells(box, height, width, latent_height, latent_width, patch_size, margin):
"""The patch cells of one latent frame under a pixel box (x, y, w, h) on a
`height` x `width` canvas, grown by `margin` about its center and clipped
to the canvas: their flat indices, ascending, in `keep_rows`' row-major
order. A cell the grown box touches at all is in (`regenerate_cells`);
a box wholly off the canvas has none."""
x, y, w, h = box
cx, cy = x + w / 2, y + h / 2
left, right = (cx - w * margin / 2, cx + w * margin / 2)
top, bottom = (cy - h * margin / 2, cy + h * margin / 2)
mask = np.zeros((1, height, width), dtype=bool)
mask[
0,
max(0, math.floor(top)) : max(0, math.ceil(bottom)),
max(0, math.floor(left)) : max(0, math.ceil(right)),
] = True
cells = regenerate_cells(mask, 1, latent_height, latent_width, patch_size, 0)
return np.flatnonzero(cells.reshape(-1))


def listen_canvas(width, height, scale):
"""The (width, height) an audio pass at `scale` runs its kept rows on: the
shorter side scaled and snapped to the nearest TILE_GRID multiple, ties
Expand Down
2 changes: 1 addition & 1 deletion dw/pipeline_processors/h3_window_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"anchor": "none",
}
HANDOFFS = ("finished", "x0")
ANCHORS = ("none", "keystone")
ANCHORS = ("none", "keystone", "keystone_face")
# What the generation refuses beyond CONFLICTS: a refine's inputs (the take is
# noise), and the refine windows, which are the other branch of the denoiser
HYBRID_REFINE_INPUTS = (
Expand Down
Loading